Mleaderstyle Lisp

Mleaderstyle Lisp

isosa9APBT
Advocate Advocate
1,659 Views
8 Replies
Message 1 of 9

Mleaderstyle Lisp

isosa9APBT
Advocate
Advocate

I need a lisp routine that will let me modify the text height and the arrow size of the MLeader command. Any help is highly appreciated, thanks.

0 Likes
1,660 Views
8 Replies
Replies (8)
Message 2 of 9

dbroad
Mentor
Mentor

So what's wrong with the mleaderstyle command?

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 9

isosa9APBT
Advocate
Advocate

They are too small. All my text is set to 4-1/2" and the Mleader text comes at 1/4". I don't want to set it up every time I open a drawing. It would be nice to run a lisp routine that changes it for me.

 

I created this one to change the DIMSTYLE  

 

(defun c:stl ()
(command "_.dimstyle" "_restore" "standard"); without any overrides
(setvar 'dimasz 4)
(setvar 'DIMLUNIT 4)
(setvar 'dimtxt 4)
(command "_.dimstyle" "_save" "standard" "_yes" "")
)

 

I tried modifying this one to change the mleaderstyle but it did not work.

0 Likes
Message 4 of 9

isosa9APBT
Advocate
Advocate

They are too small. All my text is set to 4-1/2" and the Mleader text comes at 1/4". I don't want to set it up every time I open a drawing. It would be nice to run a lisp routine that changes it for me.

 

I created this one to change the DIMSTYLE  

 

(defun c:stl ()
(command "_.dimstyle" "_restore" "standard"); without any overrides
(setvar 'dimasz 4)
(setvar 'DIMLUNIT 4)
(setvar 'dimtxt 4)
(command "_.dimstyle" "_save" "standard" "_yes" "")
)

 

I tried modifying this one to change the mleaderstyle but it did not work.

0 Likes
Message 5 of 9

dbroad
Mentor
Mentor

Set your mleader elements to the right plot size and set the style to annotative.  Whatever your scale is, they will be the right size. No programming necessary.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 6 of 9

isosa9APBT
Advocate
Advocate

I have lisp routines that set up everything for me. I don't want to manually go set everything up on each new project. We don't use the annotative option. 

0 Likes
Message 7 of 9

hencoop
Advisor
Advisor

Maybe you can adjust this values in mltstyle.lsp to work for you.

I got some help here and on the web with it.

Thanks Lee Mac for mlsleft.lsp

He and others helped with other parts.

 

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 8 of 9

hencoop
Advisor
Advisor

BTW I still use DIMSCALE=0 for my sheets.  I use a Text Style height of 0 as well (with Annotative unchecked) and programatically set the TEXTSIZE based on the viewport scale as part of my text, mtext and multileader placement handling functions.  It will ask me for a Leroy size but I just enter through when my default works.  Not true "Leroy" as it accepts REAL numbers as well.  The Leroy value gets divided by 100 and multiplied by the viewport scale and that becomes my current TEXTSIZE.

 

I'm kinda partial to Leroy.  I began in this business drafting ink on mylar.  I did plenty of hand lettering but mostly I used a K&E Leroy scribe and template.  I find it really easy to pick a text size from that old legacy use.

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
0 Likes
Message 9 of 9

isosa9APBT
Advocate
Advocate

Sorry for the late reply, I been pretty busy at work. I'll give it a try as soon as I can and if this helps then I'll give you the kudos and the solution vote. I also use the dimscale of 0. I use most of my text at 4.5 inches in model space and the majority of my scale is 1/4 inch in paperspace. As long as it gives me the options to create a new mleaderstyle or modify the existing one it should be fine. I found code to create a new style and it modifies everything except for the arrow size. I was going to try to edit that code but it is a little more complicated than what I'm used to dealing with. Well thanks for the reply and I'll get back here as soon as I get to try it.

0 Likes