The location of the text on the dimension line.

The location of the text on the dimension line.

jarle_oudalstoelEN4BR
Participant Participant
268 Views
5 Replies
Message 1 of 6

The location of the text on the dimension line.

jarle_oudalstoelEN4BR
Participant
Participant

Hi everyone.

 

I'm working on some automation for dimensioning a drawing.

The issue I'm having is when the dimension lines are close together I would like to move the text to the right or left side.

jarle_oudalstoelEN4BR_0-1744042068402.png

In the image above I would like move the 12 to the right side of the arrows. 

This is the code line I am currently using to place this dimension

SP01 = oView.GetIntent({SUBASS, SUBASS2, oPart},"FRONT RIGHT 1")
LDIMNUMBER = LDIMNUMBER + 1
oLinDim = oGenDims.AddLinear(LDIMNAME & LDIMNUMBER, oView.SheetPoint(0.0, -0.1), SP01, , , , , oNewStyle02)

 I would also like to move the 2 dimension above the respective arrows. 

 

All help would be greatly appreciated. 

Best regards Jarle

0 Likes
269 Views
5 Replies
Replies (5)
Message 2 of 6

Stakin
Collaborator
Collaborator
oLinDim.text.HorizontalJustification=Inventor.HorizontalTextAlignmentEnum.kAlignTextRight

 

Message 3 of 6

jarle_oudalstoelEN4BR
Participant
Participant

Hi Stakin.

 

I appreciate the response. I did add that line to my code but unfortunately I'm getting an error message. 

The error is as shown below.  

jarle_oudalstoelEN4BR_0-1744118436547.png

Maybe you can help me with what I'm not doing in my code? 

0 Likes
Message 4 of 6

Stakin
Collaborator
Collaborator
 
oLinDim.NativeEntity.text.HorizontalJustification=Inventor.HorizontalTextAlignmentEnum.kAlignTextRight
 
Message 5 of 6

jarle_oudalstoelEN4BR
Participant
Participant

Hi Stakin.

 

I really appreciate your input on my issue. 

The code line you provided will make the text justification right oriented in the text window in the Edit Dimension dialog box. That is very valuable for me to know so I do appreciate the knowledge you shared. unordinary it does not solve my problem. 

Now this all might be my poor explanation of my issue.

 

When I use iLogic to place my dimension it puts the number in the middle of the line as shown by the red circle (1)

What I would like to do is force it to the right side as shown in the green circle (2)

jarle_oudalstoelEN4BR_0-1744832975344.png

 

 

0 Likes
Message 6 of 6

jarle_oudalstoelEN4BR
Participant
Participant
0 Likes