pnorman
2005-05-31, 11:14 PM
I am using vla-move to move objects in a selection set but as I couldn't find a way to do it directly I came up with the following function to move the objects. I am using ssadd to create SS1 and add objects to it. Am I missing something? Is there a simpler way?
(defun ppn:vla-move-ss (SS P1 P2 / #)
(setq # 0)
(while (<= # (1- (sslength SS)))
(vla-move (vlax-ename->vla-object (ssname SS #)) P1 P2)
(setq # (1+ #))
)
)
(ppn:vla-move-ss SS1 (vlax-3d-point PT1) (vlax-3d-point INSPT))
Thanks
(defun ppn:vla-move-ss (SS P1 P2 / #)
(setq # 0)
(while (<= # (1- (sslength SS)))
(vla-move (vlax-ename->vla-object (ssname SS #)) P1 P2)
(setq # (1+ #))
)
)
(ppn:vla-move-ss SS1 (vlax-3d-point PT1) (vlax-3d-point INSPT))
Thanks