gliderflyer
2013-09-09, 04:43 PM
It's been awhile and my lisp skills are rusty. Very rusty.
I have a lisp routine that draws a 2 section leader with no text. It then inserts a weld symbol at the end of the leader.
It works great but I'd like the routine to behave so that the leader can be as many sections as the user wants and then adds the weld symbol.
Am I going to need to add variables (PT1 PT2 etc.) and draw the leader to those points or can this routine be easily modified?
The 2 section leader is defined by the three pauses. I was hoping there was an easy modification this line to make it work.
Thanks!
Randy
(defun c:WLDLDR7 (/ CL SM OM)
(setvar "cmdecho" 0)
;
;get current variables
(setq CL (getvar "clayer"))
(setq SM (getvar "osmode"))
(setq OM (getvar "orthomode"))
(setvar "osmode" 0)
(setvar "orthomode" 0)
(princ "\n Multi Section Weld Leader Right")
(command "-layer" "s" "s-extent" "")
(command "-dimstyle" "r" "ssf-weld-leader")
(command "dimscale" sf)
(setvar "orthomode" 0)
(command "leader" pause pause pause "" "" "n")
(setvar "orthomode" 1)
(command "_insert" "wsym-rgtn" "@" sf sf "" "")
(command "explode" "l" "" "")
;put setvars back to starting values
(setvar "clayer" CL)
(setvar "osmode" SM)
(setvar "orthomode" OM)
(princ)
)
I have a lisp routine that draws a 2 section leader with no text. It then inserts a weld symbol at the end of the leader.
It works great but I'd like the routine to behave so that the leader can be as many sections as the user wants and then adds the weld symbol.
Am I going to need to add variables (PT1 PT2 etc.) and draw the leader to those points or can this routine be easily modified?
The 2 section leader is defined by the three pauses. I was hoping there was an easy modification this line to make it work.
Thanks!
Randy
(defun c:WLDLDR7 (/ CL SM OM)
(setvar "cmdecho" 0)
;
;get current variables
(setq CL (getvar "clayer"))
(setq SM (getvar "osmode"))
(setq OM (getvar "orthomode"))
(setvar "osmode" 0)
(setvar "orthomode" 0)
(princ "\n Multi Section Weld Leader Right")
(command "-layer" "s" "s-extent" "")
(command "-dimstyle" "r" "ssf-weld-leader")
(command "dimscale" sf)
(setvar "orthomode" 0)
(command "leader" pause pause pause "" "" "n")
(setvar "orthomode" 1)
(command "_insert" "wsym-rgtn" "@" sf sf "" "")
(command "explode" "l" "" "")
;put setvars back to starting values
(setvar "clayer" CL)
(setvar "osmode" SM)
(setvar "orthomode" OM)
(princ)
)