It was part of some explanation Seann wrote out for a problem he was having. I could not stop laughing at his metaphor.
OK, how about this?
- (defun c:TZP (/ #SS #Pnt1 #Pnt2 #New) (cond ((and (setq #SS (ssget "_:L")) (setq #Pnt1 (getpoint "\nSpecify base point: ")) (setq #Pnt2 (getpoint "\nSpecify point for new Z value: ")) ) ;_ and (setq #New (vlax-3D-point (list (car #Pnt1) (cadr #Pnt1) (caddr #Pnt2))) #Pnt1 (vlax-3D-point (list (car #Pnt1) (cadr #Pnt1) 0)) ) ;_ setq (vlax-for x (setq #SS (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object))) ) ;_ setq (vla-move x #Pnt1 #New) ) ;_ vlax-for (vl-catch-all-apply 'vla-delete (list #SS)) ) ) ;_ cond (princ)) ;_ defun
Dirty command version:
- (defun c:TZP (/ #SS #Pnt1 #Pnt2) (and (setq #SS (ssget "_:L")) (setq #Pnt1 (getpoint "\nSpecify base point: ")) (setq #Pnt2 (getpoint "\nSpecify point for Z value: ")) (command "_.move" #SS "" "_non" #Pnt1 ".Z" "_non" #Pnt2 "_non" #Pnt1) ) ;_ and (princ)) ;_ defun
|