JeepMaster Posted August 21, 2008 Posted August 21, 2008 I have a custom leader lisp that draws a leader perfectly if the dwg is metric. When the dwg is imperial, the leader head is 25.4X smaller. Is ther a way to check for drawing units on the lisp? and then scale the leader head 25.4 times? ;;;Conduit Leader;;; (defun c:cld ( / ) ;;store orig error handler, assign new error handler (setq OrigError *error* *error* *InsError*) (command "-insert" "cleader");****** the cleader.dwg must be in one of the support path for it to work!****** (command);;cancels the insert (setvar "dimldrblk" "cleader") (setvar "texteval" 1) (prompt "\nCLeader") (setq CL (getvar "clayer")) (c:setlayer "E-ANNO-TEXT") (command "_.qleader") (while (> (getvar "cmdactive") 0);;pauses while command is active (command pause) ) (setvar "dimldrblk" ".") ;;restore arrowhead (setvar "clayer" CL);;restore layer (setq *error* OrigError);;restore default error handler (princ) ) ;;---error handler for routine------- (defun *InsError* (msg) (princ (strcat msg " ** CLeader Terminated **")) (if CL (setvar "clayer" CL));;restore layer (setvar "dimldrblk" ".") ;;restore arrowhead (setq *error* OrigError) ) CLeader.dwg Quote
JeepMaster Posted August 21, 2008 Author Posted August 21, 2008 (getvar "LUNITS") Hmm...LUNITS only tells me if it's: 1 Scientific 2 Decimal 3 Engineering 4 Architectural 5 Fractional It doesn't tell me if the dwg is metric or imperial. Quote
fuccaro Posted August 21, 2008 Posted August 21, 2008 (getvar "MEASUREMENT") will return 0 for imperial units and 1 for metric. Quote
JeepMaster Posted August 21, 2008 Author Posted August 21, 2008 (getvar "MEASUREMENT") will return 0 for imperial units and 1 for metric. Thanks. I got it now. Quote
fuccaro Posted August 22, 2008 Posted August 22, 2008 To VovKa I see you posted the same answer just with one minute later as I did. There is no need to delete your own post. This forum is full of duplicate answers. Quote
VovKa Posted August 22, 2008 Posted August 22, 2008 ok, thanks fuccaro, i'll do as the ancients said - "Repetitio est Mater Studiorum" Quote
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.