feargt Posted May 23, 2013 Posted May 23, 2013 Hi, I am trying to align mleaders in a simple lisp file. The lisp file creates the mleaders and then using "mleaderalign" command I am trying to align them using spacing. The problem is when I have to choose the base mleader to create the spacing from. I cannot seem to select it. I have tried several variations without success. Does anyone have any ideas? I want if possible to avoid the user having to select it. Thanks (defun c:Test (/ MLDRS ML1) (command "_mleader" "_ov" "11,9.5" "16,9.5" "Some Text here, and a bit more here" "9,7.5" "") (setq ML1 (ssget "_L")) (command "_mleader" "ü" "11,8.5" "16,8.5" "Some Text here, and a bit more here and then some more" "9,6.5" "") (command "_mleader" "ü" "11,7.5" "16,7.5" "Some Text here, and a bit more here and that should be enough" "9,5.5" "") (setq MLDRS (ssget "_X" '((0 . "Multileader")))) (command "_mleaderalign" MLDRS "" "_o" "_s" "1" ML1 "-1") ) Quote
feargt Posted May 24, 2013 Author Posted May 24, 2013 (edited) For anyone interested, I have solved this for my needs, at least for what I want anyway. The coordinates and text for each mleader are actually known variables that are read from excel in this case. If multileader that I want to select for the mleaderalign is the last one created then when I make my selection set Autocad sets a temporary UCS at this multileader when giving the user the option to select the multileader to use as the base mleader for the spacing, that means I can select the multileader by entering coordainate point "0,0". Probably not the most elegant solution but at the moment it works for me. (defun c:Test (/ MLDRS ) (command "_mleader" "_ov" T2L T2R TXT2 "") (command "_mleader" "_ov" T3L T3R TXT3 "") (command "_mleader" "_ov" T1L T1R TXT "") (setq MLDRS (ssget "_X" '((0 . "Multileader")))) (command "_mleaderalign" MLDRS "" "_o" "_s" "1" "0,0" "-1") ) Edited May 24, 2013 by feargt solution 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.