
Registered forum members do not see this ad.
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 <exit>:")))
(setq pt (getpoint "\nSpecify point on side to offset:"))
)
(command "._offset" 0.75 ent "_non" pt "")
(command "._change" (entlast) "" "_P" "_LA" "0" "")
)
(princ)
)




Registered forum members do not see this ad.
look and learn...
You know the OOTB offset command in 2008 has an option for putting the offset line on a different layer than original.Code:(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) )
Bookmarks