Hey guys I am trying to modify this reference line routine and want the distance to be preset to 18 inches. How would I modify this to do that? Currently I am doing furniture plans and need to draw a polyline around the outer profile of the fixture then offset the polyline out 18 inches to show the required clearance. I'd like to be able to automate the creation of the profile but can't see how that would be possible as I am only creating a profile of the parts that are more than 18 inches apart from one another. Am I making sense or is a picture required?
;;; DRAWS A LINE THEN ASKS WHICH SIDE TO OFFSET AND DISTANCE, CLEARANCE LINE
(defun c:FSCL (/ usercmd en1 clay dist)
;; ------- Some Housekeeping ------------------
(setq usercmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(setq clay (getvar 'clayer))
(command "_.layer" "m" "I-FIXT-FLOR-HIDE" "C" 8 "" "")
(setq useros (getvar "osmode"))
(setvar "osmode" 175)
(prompt "/nPick points, Enter when done.")
;; Draw the pline
(command "PLINE") ;_ COMMAND
(while (> (getvar "CMDACTIVE") 0)
(command pause)
)
(setq en1 (entlast))
(initget 1)
(setq pto (getpoint "\nSide to offset:"))
(setq dist (getreal "\nEnter offset distance:"))
(command "_.offset" dist en1 pto "")
(entdel en1) ; remove the user drawn line
;;========== Exit Sequence ============
(setvar "CMDECHO" usercmd)
(setvar "clayer" clay)
;; Exit quietly
(princ)
) ;_end of defun