Moving set ss to 0,0,0

Oct 08, 2003 5 Replies

Hi all...



What would the lisp command be to move my selection set entities "ss" from "pt1" to 0,0,0 ?



BTW....I want pt1 to be the "inbase" value of the drawing....whatever the value. Would the following line be correct...?



(setq pt1 (getvar "insbase"))



TIA



DP


(command "_.move" ss "" pt1 '(0 0 0)) ___

HiHo; Yes the setq pt1 is ok, BUT, When the command "move" is executed Where is the base point for said selection set? Also if pt1 is used in a command preface it with a ! symbol. i.e. !pt1

Yes, and no. The full lisp routine would be something like:

(defun C:MOVE0 ( / ss pt1 pt2 ) (setq ss (ssget "X") pt1 (getvar "INSBASE") pt2 (list 0.0 0.0 0.0) );setq (command ".MOVE" ss "" pt1 pt2) );defun

If manually passing a variable to a command, then yes, precede it with an exclamation point. Within a lisp routine, no. (Just trying clarify.)

Thanks for you input

DP

Thanks Tom for clarifying...

DP

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required