View Full Version : Leader lisp help
jdcincy
2012-03-09, 01:19 PM
Im using 2009 Mechanical, I have a question about the "mleader" command.
I have always used the "leader" command with this caveman lisp
(DEFUN C:LE() (COMMAND "LEADER" "NEAR"))
1. I would like to have the same snap function with the mleader command, but I cant seem to make it work.
2. I also noticed I could only write one line of text after creating the leader using mleader. Anyone know the command to change that?
3. I see I can change mleader styles with mleaderstyle command, but where are the style changes for the regular leader command? I know some style changes are made in the dimension style manager but I cant seem to find how to specify where the text is located off the landing.
I know all this must really seem trivial to most but please dont make to much fun of me. Just trying to learn new stuff.
ccowgill
2012-03-09, 01:36 PM
Ok, lets see if we can get these answered one at a time.
Im using 2009 Mechanical, I have a question about the "mleader" command.
We cant all be perfect, it should work the same as Vanilla. :)
I have always used the "leader" command with this caveman lisp
(DEFUN C:LE() (COMMAND "LEADER" "NEAR"))
1. I would like to have the same snap function with the mleader command, but I cant seem to make it work.
For the mleader command to function properly you have to do something like this:
(defun c:LE ()
(setvar "cmleaderstyle" "Engineering Label")
(initcommandversion 2)
(command "mleader" "_near")
(setvar "cmleaderstyle" "Engineering")
) ;_ end of defun
note the (initcommandversion 2) it is critical to making the command function, and obviously your mleaderstyle may be differently named than what I use.
2. I also noticed I could only write one line of text after creating the leader using mleader. Anyone know the command to change that?
this should be resolved by using (initcommand 2) as above.
3. I see I can change mleader styles with mleaderstyle command, but where are the style changes for the regular leader command? I know some style changes are made in the dimension style manager but I cant seem to find how to specify where the text is located off the landing.
When we used to use regular qleaders (never used the leader command) we had a lisp routine that set our specified settings:
http://forums.augi.com/archive/index.php/t-5248.html
I know all this must really seem trivial to most but please dont make to much fun of me. Just trying to learn new stuff.
Eventually most of what we learn seems trivial, but it wasnt when we started. :)
jdcincy
2012-03-09, 02:06 PM
Thanks ccowgill, this will help me allot.
I started with R12 and in the past 12 years I have changed little in how I draft. This past year I have had more time and have been trying to learn all the new features. I have been blown away with what I have done with dynamic blocks, fields and sheet sets. Things that have been out for years that I am just now getting to learn and use.
A couple of questions
1. we have thousands of details where the text and the leaders are stand alone objects. is there a way to link them together?
2. In mtext I see the symbols option, is it possible to make customized symbols?
3. when I use the symbols my font changes. Im using a font called hands.shx, is this font style not compatible.
jdcincy
2012-03-09, 02:36 PM
I also get this error when I run your lisp. What variable should I use instead?
; error: AutoCAD variable setting rejected: "cmleaderstyle" "Engineering Label"
jdcincy
2012-03-09, 04:15 PM
ccowgill, no need to reply I think I have all this figured out now. Thanks for your help!
ccowgill
2012-03-09, 05:52 PM
Thanks ccowgill, this will help me allot.
I started with R12 and in the past 12 years I have changed little in how I draft. This past year I have had more time and have been trying to learn all the new features. I have been blown away with what I have done with dynamic blocks, fields and sheet sets. Things that have been out for years that I am just now getting to learn and use.
A couple of questions
1. we have thousands of details where the text and the leaders are stand alone objects. is there a way to link them together?
2. In mtext I see the symbols option, is it possible to make customized symbols?
3. when I use the symbols my font changes. Im using a font called hands.shx, is this font style not compatible.
Engineering Label is the name of one of my mleader styles. you do not need to change the mleader style for each mleader, that is just a particular example that I had that required no changes. At our office we have 5 standard mleader styles, different key-ins give you a different style, one has a block for calling out hazardous utilities, another for fiber optic, another with no text, our main one, and one with a label block.
1. There are programs out there that you can use to combine a leader and text into a mleader, however, it is somewhat clunky and doesnt always work. I think Irneb or Chriswade wrote it. It is either located on the AUGI forums, or over at theSwamp.org, as we all frequent multiple forums, it all kind of blends together.
2.It is possible to create customized symbols, I believe a few years back I created a top of water symbol. It has been many years since I have done so, and I cant remember how to access the symbol creator program. I think it is a standard Windows program. More recently I have just resorted to creating a custom font that includes our symbols, but that means the font has to go to everyone who wants to see the custom symbol.
3. typically certain special characters only exist in certain fonts. If you font does not contain a particular character, it will substitute your font for one that does contain the symbol you are looking for. Most notably is the Arial font and its lack of a centerline character. AutoCAD automatically swaps out for a font called Isocepeur or something similar. To resolve this issue, when we switched our company font to Arial from simplex, we added a few custom characters to the Arial font. So it is possible that your font doesnt contain that special character.
jdcincy
2012-03-09, 06:52 PM
Thank you for your time today. You have helped me allot.
Im looking at all this carefully and trying to find all benefits of using mleader. Honestly, I have always type my notes for a detail on one side and added my leader afterwords.
Now that you have helped me to get the basic functions down, I can go and see if I can find time saving benefits for our company.
Thanks again!
ccowgill
2012-03-09, 07:41 PM
Thank you for your time today. You have helped me allot.
Im looking at all this carefully and trying to find all benefits of using mleader. Honestly, I have always type my notes for a detail on one side and added my leader afterwords.
Now that you have helped me to get the basic functions down, I can go and see if I can find time saving benefits for our company.
Thanks again!
No problem, thats what we are here for.
I will tell you that in my experience, it took some getting used to the multileaders. They seemed a little awkward or time consuming to use when I first started, but the saved a ton of time down the line when modifying notes, or moving them around. After I got used to using the multileader, I dont think I could go back.
jdcincy
2012-03-09, 08:06 PM
Thats all I needed to hear. I will continue to work with mleader because last year I felt the same way about associative dimensions. (Im slow to change) I wouldn't use them because I couldn't figure out how to manage them quickly. Quick properties changed all that. Now I can easily modify my dimensions and plans. Now I wont start a drawing unless dimaso is ON.
Thanks for your encouragement I dont mind slowing down some, for a real gain later.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.