AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

Reply
Active Contributor
elliottsmith7252
Posts: 32
Registered: ‎03-31-2011
Message 1 of 12 (2,367 Views)
Accepted Solution

Dimension Styles (Leader Landing)

2367 Views, 11 Replies
12-06-2011 01:41 PM

Hopefully this is just a matter of my not looking long enought. But i feel like i'm going crazy because i can't find what dimstyle property controls this.

 

See the attached example.

 

Thanks,

Hi Elliott,

No, I didn't forget about trying to put together an application to modify dimension leader landings.  It just took a while to really check out the limitations and possibilities.  The exercise turned out to be an opportunity to learn more about some of the features and limitations of AutoLISP programming, dimension variables, and the AutoCAD entity database.  Actually, it seems to be quite complicated.  There are lots of settings, but as in your case maybe not the exact one you are seeking.

Unfortunately the original LISP application did not fully work out after more testing and analysis.  While the original application is able to modify the dimension leader landing and text gap length independently, the change is only temporary.  After modification, if I select a grip on the dimension, modify a dimension property through the Properties window, or open the drawing with RECOVER the dimension leader landing reverts back to the style defaults.  The only way I found to get around the reversion is to explode the dimension after modification.  So that to me is not a good solution, and not worth posting.  

So after more analysis and experimentation on my end, here is the less elegant work around: Override the dimension gap for a given dimension and draw an extension to the leader landing.  So you could do the following:

  • Determine the total length for the leader landing and text gap that you want.
  • Divide the total length by 3 times the dimension scale (New Dimension Gap = Total Length/(3 x Dimension Scale).  Type DIMSCALE to find current scale if needed.
  • Type DIMOVERRIDE on the command line.
  • At prompt to "Enter dimension variable name to override ...", type DIMGAP.
  • Type in the New Dimension Gap calculated above.  Hit Enter key twice.
  • Select the dimension(s) that you want to modify.
  • Reposition dimension leader(s).
  • Draw an extension line(s) to extend the leading landing(s) to the desired position next to dimension text.

The procedure above is correct for linear/rotated and aligned dimensions, but would need to be modified for other dimension types or if the dimension scale for a given dimension has been overriden.  Also the DIMASZ variable does have an affect on the leader landing length but not for linear/rotated and aligned dimensions.

So with all of that in mind I did put together an AutoLISP application that in essence leads you through the process off extending the leader landing for an individual dimension (see attached).  It is questionable whether this is really that much help, as in some cases you my have to further adjust the dimension leader to get it display the way you want.  But it does seem to work fine in most instances.  While I have gone through testing the application, there still may be some instances where something does not work correctly.  Like I said, lots of variables!

Anyway, if interested download the attached dgo.lsp file, open the .lsp file with Notepad to read more about it prior to using it, and load it through the Load/Unload Applications dialog box (type APPLOAD at the command line).  Type DGO at the command line to execute application.  Test it out and see what you think.

*Expert Elite*
Patchy
Posts: 6,325
Registered: ‎09-16-2009
Message 2 of 12 (2,343 Views)

Re: Dimension Styles (Leader Landing)

12-06-2011 02:17 PM in reply to: elliottsmith7252

Not by this?

Active Contributor
elliottsmith7252
Posts: 32
Registered: ‎03-31-2011
Message 3 of 12 (2,316 Views)

Re: Dimension Styles (Leader Landing)

12-06-2011 02:29 PM in reply to: Patchy

I wouldn't think so, since it's not a multileader, it's a dimension. 

*Expert Elite*
Patchy
Posts: 6,325
Registered: ‎09-16-2009
Message 4 of 12 (2,314 Views)

Re: Dimension Styles (Leader Landing)

12-06-2011 02:32 PM in reply to: elliottsmith7252

Attach it the dwg here with the the dimensions. Let's rip it apart.

Active Contributor
elliottsmith7252
Posts: 32
Registered: ‎03-31-2011
Message 5 of 12 (2,312 Views)

Re: Dimension Styles (Leader Landing)

12-06-2011 02:33 PM in reply to: elliottsmith7252

You know, looking again at the jpeg I attached, I think I might need to clarify my question. 

 

Try this; dimension something, move the text of the dimension away from the dimension line. Now you have a leader point to the dimension line and a landing to the text.

 

How do you change the length of the landing?

Active Contributor
elliottsmith7252
Posts: 32
Registered: ‎03-31-2011
Message 6 of 12 (2,310 Views)

Re: Dimension Styles (Leader Landing)

12-06-2011 02:38 PM in reply to: elliottsmith7252

Maybe an example will help. 

Valued Mentor
gjrcmb
Posts: 326
Registered: ‎06-21-2011
Message 7 of 12 (2,283 Views)

Re: Dimension Styles (Leader Landing)

12-06-2011 04:50 PM in reply to: elliottsmith7252

Appparently the length of the landing or hook line length is calculated based upon the DIMGAP variable, which affects the gap between the text and the hook line.  From what I can tell the hook length is calculated at 2 times the gap.  See Autocad command reference for DIMGAP for more information.

The AutoCAD command reference also indicates that the DIMASZ variable "also controls the size of hook lines", but I am unable to figure out how?

So I am not really finding that there is a way to control the gap and the landing length independently.

Active Contributor
elliottsmith7252
Posts: 32
Registered: ‎03-31-2011
Message 8 of 12 (2,265 Views)

Re: Dimension Styles (Leader Landing)

12-08-2011 11:18 AM in reply to: gjrcmb

With a variable for everything else, I would have thought that this was a pretty important element to be able to control. 

 

Am i just super picky? Nobody else has this problem?

Valued Mentor
gjrcmb
Posts: 326
Registered: ‎06-21-2011
Message 9 of 12 (2,263 Views)

Re: Dimension Styles (Leader Landing)

12-08-2011 11:38 AM in reply to: elliottsmith7252

Well it seems like I ran into this limitation somewhere along the way, but I guess I just lived with what the system allowed me to do.  It seems like there is always a desire for more granularity despite all the details that the software already has.

 

Anyway, with that it mind I started playing with writing a LISP application to be able to modify the leader landing and text gap independently which does seem to work.  I am still working on refining and checking the application so I am not ready to post it.  The lisp routine would allow you to change the setting for a given dimension leader landing, but not on an overall style basis.  It may not be what your looking for, but I will post it if it seems to function without flaws.

Active Contributor
elliottsmith7252
Posts: 32
Registered: ‎03-31-2011
Message 10 of 12 (2,261 Views)

Re: Dimension Styles (Leader Landing)

12-08-2011 11:57 AM in reply to: gjrcmb

Color me impressed. The solution you propose seems perfect. 

It's really a problem in so few cases I typically end up exploding the dim, but obviously that can turn into a huge mess pretty quick, esp. with a big DWG w. Annotative dims. 

The individual tweak concept you propose would be so perfect that I would not even call it a work around but a straight-up solution. 

 

If you do ever get it working to your satisfaction and post it here, I would be grateful, to say the least. 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.