ability to rotate dimention text through API

ability to rotate dimention text through API

Anonymous
Not applicable
588 Views
6 Replies
Message 1 of 7

ability to rotate dimention text through API

Anonymous
Not applicable

Greetings everyone,

 

I would like to ask if anyone knows a way -if there is any- to rotate a dimension's text through the API. Especially the text of a vertical dimension.

Currently, if a vertical dimension is placed, the text can be read from top to bottom but in some cases it would be prefered if the text could be read from bottom to top. Sadly, I cannot find a way of doing this.

 

Thank you all in advance.

0 Likes
589 Views
6 Replies
Replies (6)
Message 2 of 7

BrandonBG
Collaborator
Collaborator

I think so...

 

The rotation is done in the text style along with the dimension style. Specifically, you'd need a new text style with the rotation set to 90 degrees (or 270). Then, create a new dimension style that includes the new text style.

 

As I navigate through the API, it looks like it can be reached here:

 

LinearGeneralDimension -> DimensionStyle -> TextStyle -> Rotation (as Double)

 

When using the API to set rotation, you'll need to convert to radians.

 

Brandon

 

 

 

 

0 Likes
Message 3 of 7

Anonymous
Not applicable

Thank you for your reply,

I will try out your suggestion and reply if it was a success

0 Likes
Message 4 of 7

Anonymous
Not applicable

Sadly it didn't work

0 Likes
Message 5 of 7

BrandonBG
Collaborator
Collaborator

I see. I just tried it too and the text didn't rotate.

 

Are you able to do this manually? If you drag the dimension text out of the line, you can force it horizontal, but then you end up with an unnecessary leader that can't be turned off.

 

Brandon

0 Likes
Message 6 of 7

ekinsb
Alumni
Alumni

I don't believe Inventor support arbitrary rotation of dimension text.  In the Dimension Style dialog on the Text tab you have some settings to control the orientation for vertical, horizontal, and aligned dimensions but there are just a couple of pre-defined orientations that you can choose from.  I believe this behavior comes as a result of what the various dimensioning standards define.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 7 of 7

Anonymous
Not applicable

thank you all for your replies. Sadly I couldn't make it work

0 Likes