Placing vertical drawing dimensions does not allow for dimension text placement on the vertical drawing axis

Placing vertical drawing dimensions does not allow for dimension text placement on the vertical drawing axis

harvey_craig2RCUH
Advocate Advocate
260 Views
2 Replies
Message 1 of 3

Placing vertical drawing dimensions does not allow for dimension text placement on the vertical drawing axis

harvey_craig2RCUH
Advocate
Advocate

In my manage dimensions I I have placed this dimension using this line:

Dim CollarDia = genDims.AddLinear("CollarDia", ThisDrawing.Geometry.Point2d(CollarDia_X_Pos, 0.5), CollarDia1, CollarDia2,,,False)

 It is placed centrally like this as my y axis is set to 0.5:

harvey_craig2RCUH_0-1723708077811.png

I would like the text to be placed below the drawing like so:

harvey_craig2RCUH_1-1723708135911.png

I have tried changing the 0.5 to -0.1 and it has no effect, the dimension just remains in the middle. What can I do?

Thanks,

Harvey

0 Likes
Accepted solutions (1)
261 Views
2 Replies
Replies (2)
Message 2 of 3

Curtis_Waguespack
Consultant
Consultant
Accepted solution

@harvey_craig2RCUH 


I think the results you are seeing are due to this setting

Curtis_Waguespack_0-1723747145284.png

 

You can turn it off in the settings, but you can't be sure that if another user runs your code on their machine, that it will be off.

 

So you can use something like this as part of your dimensioning code, to turn it off and then back on again:

 

'turn off centerdimensiontext setting, and then set it back to what the user had already set
oCurrentValue = ThisApplication.DrawingOptions.CenterDimensionText 

ThisApplication.DrawingOptions.CenterDimensionText = False 

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")
Dim Face0 = VIEW1.GetIntent("Face0")

Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions
Dim linDim1 = genDims.AddLinear("Dimension 1", VIEW1.SheetPoint(0.5, 1.1), Face0)

Dim Face2 = VIEW1.GetIntent("Face2")
Dim Face1 = VIEW1.GetIntent("Face1")

Dim linDim2 = genDims.AddLinear("Dimension 1", VIEW1.SheetPoint(1.25, 1.3), Face1, Face2)

ThisApplication.DrawingOptions.CenterDimensionText = oCurrentValue 

 

 

EESignature

Message 3 of 3

harvey_craig2RCUH
Advocate
Advocate

Hi Curtis,

Works perfectly!

Thanks,

Harvey

0 Likes