Create Angle Dim Like This?

Create Angle Dim Like This?

Curtis_Waguespack
Consultant Consultant
347 Views
2 Replies
Message 1 of 3

Create Angle Dim Like This?

Curtis_Waguespack
Consultant
Consultant

Does anyone know what we need to do to get the "alternate angle" or whatever it is called?

 

see the attached 2024 drawing for an example.

 

Thanks!

Curtis

 

Trying to get this result using the code below:

Curtis_Waguespack_0-1696962828632.png

 

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW3 = Sheet_1.DrawingViews.ItemByName("VIEW2")
Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions

Dim Bottom = VIEW3.GetIntent("Bottom")
Dim ChamferFace = VIEW3.GetIntent("ChamferFace")

Dim PointOnSheet As DocumentUnitsPoint2d = ThisDrawing.Geometry.Point2d(3.4, 5.5)
Dim angDim1 = genDims.AddAngular("Angular Dim 1", PointOnSheet, Bottom, ChamferFace)

 

 

But I'm getting this result:

Curtis_Waguespack_1-1696962922529.png

 

 

EESignature

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

g.georgiades
Advocate
Advocate
Accepted solution

 

Edit: actually the AddAngular has an optional parameter to specify to use the quadrant directly.

 

Function AddAngular ( 
	name As String,	textOrigin As AngularDimensionTextPositionSpec,	intentOne As GeometryIntent,
	Optional intentTwo As GeometryIntent = Nothing,
	Optional intentThree As GeometryIntent = Nothing,
	Optional arrowHeadsInside As Boolean = true,
	Optional useQuadrant As Boolean = true,
	Optional oppositeAngle As Boolean = false,
	Optional dimensionStyle As DimensionStyle = Nothing,
	Optional layer As Layer = Nothing
) As IManagedAngularGeneralDimension

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=c0a7eb37-0d59-962c-56f5-aef421470772

 

 

 

angDim1.UseQuadrant = False

 

 

 

You may have to create the dimension with the text centered, set the quadrant off, then move the text to the side.

 

 

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=AngularGeneralDimension_UseQuadrant

Message 3 of 3

Curtis_Waguespack
Consultant
Consultant

 Thanks! @g.georgiades 

 

I think that was what I was missing. 

 

Here's what worked with the example I posted.

 

 

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW2 = Sheet_1.DrawingViews.ItemByName("VIEW2")
Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions

Dim Bottom = VIEW2.GetIntent("Bottom")
Dim ChamferFace = VIEW2.GetIntent("ChamferFace")

ThisApplication.DrawingOptions.CenterDimensionText = True

Dim PointOnSheet As DocumentUnitsPoint2d = ThisDrawing.Geometry.Point2d(3.4, 6)
Dim angDim1 = genDims.AddAngular("Angular Dim 1", PointOnSheet, Bottom, ChamferFace)

MsgBox("pause to observe original position", , "iLogic")

'get API object for the dim
Dim angDim As AngularGeneralDimension = angDim1.NativeEntity

'get units conversion
Dim UOM As UnitsOfMeasure = ThisDoc.Document.UnitsOfMeasure
oConverson = UOM.ConvertUnits(1,  UOM.LengthUnits,UnitsTypeEnum.kDatabaseLengthUnits)

PointOnSheet = ThisDrawing.Geometry.Point2d(3.4, 5.5)
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim NewPoint As Point2d = oTG.CreatePoint2d(PointOnSheet.X * oConverson, PointOnSheet.Y * oConverson)

angDim.UseQuadrant = False
'change position of the dim text
angDim.Text.Origin = NewPoint

 

EESignature

0 Likes