API Dimension Allignment

API Dimension Allignment

johnster100
Collaborator Collaborator
547 Views
4 Replies
Message 1 of 5

API Dimension Allignment

johnster100
Collaborator
Collaborator

Hi,

I'm trying to arrange some dimensions using the API but I am ending up with dimension like the first image. The text is in the correct location but the leader to it is a mess. I would like it  to be like in the second image. 

1.JPG

 

I want this:

2.JPG

 

Is there a way to do this using styles? To no allow a vertical section of the leader? (I looked but couldn't see anything)

 

Or is there a simple way to code to force the behaviour i want?

 

thanks,

John

0 Likes
Accepted solutions (1)
548 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Maybe.  When you have your Styles Editor dialog open, and a Dimension style selected, go to the Text tab on the right, then look in the settings within the Orientation > Linear area.  The two on the right are for that sort of thing...forcing the text of a dimension to be 'inline' or 'aligned' with the dimension, rather than horizontal.

WCrihfield_0-1639052495183.png

 

Then there are similar settings for Diameter and Radius dimensions below that.  What I have done for such occasions is I created a copy of my normal dimension style, and added a label of 'aligned' to it.  Then set all those similar settings within it, and saved it to the library, so that it is available in other drawings.  Then any time I want to create dimensions where the dimension's text is aligned with the dimension, rather than horizontal, I just use that other dimension style when I create it, or change the dimension's style after creating it.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 5

johnster100
Collaborator
Collaborator

Hi,

I tried that, but I couldn't get it to work 😞

 

I have created a simple drawing with an ilogic rule in to demonstrate the issue.

 

any other help would be appreciated,

thanks,

John

 

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor
Accepted solution

When I inspected the dimension style being used by that dimension, I still found this setting (labeled 'Aligned Dimension: Inline - Hosizontal' when you hover over it) set to 'horizontal'...

WCrihfield_0-1639064349191.png

...so I changed that to the one called 'Aligned Dimension: Inline - Aligned'...

WCrihfield_1-1639064588183.png

...and that changed the dimension text to be aligned with the dimension line...at least at first.

But then, if you drag it around a bit, or run your rule on it, which simply moves the dimension test, it then wanted to form a horizontal line with the dimension text at the end of it (now horizontal text).  I'm honestly not really sure if that is avoidable.  I think you just have to make sure the text placement is either between the dimension lines (and not too far above or below where it would normally be), or directly off to one side, while still being relatively in-line with where it would normally be.  The settings on the 'Display' tab of the dimension style editor dialog is where you can dictate where you want everything to be by default.  There are also iLogic rules out here on the forums about re-aligning, and re-centering all kinds of dimensions according to these outlines after the fact.  This little detail is just one of the many reasons that full, custom drawing automation is so complicated to achieve.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 5

johnster100
Collaborator
Collaborator

yeah, it's just one of those annoying things, haha

 

thanks for your help,

John

0 Likes