trese Posted August 29, 2014 Posted August 29, 2014 Hi, I have a lisp taken from several forums and stiched it together, what it does is it would select a polyline, then offset it with multiple lines and deletes the selected polyline. Now, how do I make this to add the polyline first, then select it to run the offset command..thanks (defun C:3off() (setq off1 1.5) (setq off2 6) (setq off3 12) (while (setq obj (car (entsel "\nSelect object:"))) (setq ps (getpoint "\nSide to offset:")) (if ps (progn (command "-layer" "set" "0" "") (command "_offset" "Layer" "Current" "" "") (command "_offset" off1 obj ps "") (command "-layer" "set" "RED_LAYER" "") (command "_offset" off2 obj ps "") (command "-layer" "set" "MAGENTA_LAYER" "") (command "_offset" off3 obj ps "") (command "-layer" "set" "0" "") (command "erase" obj "") ) ) ) (princ) ) Quote
trese Posted August 29, 2014 Author Posted August 29, 2014 found the answer, I added the following command before the nselect line : (command "pline"(while (> (getvar 'cmdactive) 0) (command pause))) The lisp now makes me draw the pline, then select it and point what side the offset will be, it offsets 3 lines with different offset values and also changes the layer and then deletes the polyline I drew.... cool! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.