WCCSAM Posted November 20, 2008 Share Posted November 20, 2008 I am trying to offset a line and have the layer of the new line to be something different. I found this code below but it defaults to 3/4" offset and I need to be able to user input the offset distance, because it will constantly be different. Can anyone please help . ;; Offset 0.75 to layer "0" (defun c:ce (/ ent pt) (while (and (setq ent (car (entsel "\nSelect object to offset 3/4 or :"))) (setq pt (getpoint "\nSpecify point on side to offset:")) ) (command "._offset" 0.75 ent "_non" pt "") (command "._change" (entlast) "" "_P" "_LA" "0" "") ) (princ) ) Quote Link to comment Share on other sites More sharing options...
lpseifert Posted November 20, 2008 Share Posted November 20, 2008 look and learn... (defun c:ce (/ od ent pt) (setq od (getdist "Enter offset distance: ")) (while (and (setq ent (car (entsel "\nSelect object to offset or <exit>:"))) (setq pt (getpoint "\nSpecify point on side to offset:")) ) (command "._offset" od ent "_non" pt "") (command "._change" (entlast) "" "_P" "_LA" "0" "") ) (princ) ) You know the OOTB offset command in 2008 has an option for putting the offset line on a different layer than original. Quote Link to comment Share on other sites More sharing options...
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.