Mike_R
2007-03-15, 05:42 PM
I'm trying to write a program that will allow me to draw a qleader with a certain dimstyle and not have to enter the default width, or tell it that I want to use the MTEXT Editor. Basically skipping the last 2-3 steps and just picking points, and entering the text. It then resets the dimstyle back to my style I use for dimensions.
I would use the "leader only" option when creating a new dimstyle, but since I have 2-3 seperate requirements for leaders (company policy) that doesn't work in my case.
The problem is, I can't find a way to throw in a while loop for setting the vertices. Everything I've tried to do has gotten it caught in the loop and I have to manually quit the routine. For now I've put a band-aid on it, so to speak. My Qleader settings have a max 3 points, and the code is set to reflect that... But I'd like to take the limit off for the few times I need to have more than 3 points in my leaders.
Here's the code... Any help would be great.
(defun c:lt (/ lay)
(command "-DIMSTYLE" "R" "LeaderTXT")
(c:t-lead)
(princ)
)
(defun c:t-lead ()
(setq lay (getvar "CLAYER"))
(setvar "CLAYER" "DIM")
(setvar "DIMSCALE" sf)
(command "qleader" "\\" "\\" "\\" "0" "")
(command "-DIMSTYLE" "R" "SGS")
(setvar "DIMSCALE" sf)
(setvar "CLAYER" lay)
)[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]
I would use the "leader only" option when creating a new dimstyle, but since I have 2-3 seperate requirements for leaders (company policy) that doesn't work in my case.
The problem is, I can't find a way to throw in a while loop for setting the vertices. Everything I've tried to do has gotten it caught in the loop and I have to manually quit the routine. For now I've put a band-aid on it, so to speak. My Qleader settings have a max 3 points, and the code is set to reflect that... But I'd like to take the limit off for the few times I need to have more than 3 points in my leaders.
Here's the code... Any help would be great.
(defun c:lt (/ lay)
(command "-DIMSTYLE" "R" "LeaderTXT")
(c:t-lead)
(princ)
)
(defun c:t-lead ()
(setq lay (getvar "CLAYER"))
(setvar "CLAYER" "DIM")
(setvar "DIMSCALE" sf)
(command "qleader" "\\" "\\" "\\" "0" "")
(command "-DIMSTYLE" "R" "SGS")
(setvar "DIMSCALE" sf)
(setvar "CLAYER" lay)
)[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]