Create a diameter dimension "dragged outside"

Create a diameter dimension "dragged outside"

C-Hoppen
Advocate Advocate
282 Views
1 Reply
Message 1 of 2

Create a diameter dimension "dragged outside"

C-Hoppen
Advocate
Advocate

Hello,

in Inventor a user can place a diameter dimension, terminate the command, grab the green center point and drag the dimension outside:

CHoppen_1-1639552958979.png

How can this be done by code?

 

A horizontal GeneralDimension with Intends kCircularLeftPointIntent and kCircularLeftPointIntent has no ø and doesn't work with with a circle through holes created by Centerlines.Add....

 

Thanks

Christoph

0 Likes
283 Views
1 Reply
Reply (1)
Message 2 of 2

aelqabbany
Advocate
Advocate

Give this a shot. You can add the ø symbol manually.

 

Dim oCircle As DrawingCurveSegment = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Select the circle you want to dimension") 

Dim oDrawCurve As DrawingCurve = oCircle.Parent
Dim oView As DrawingView = oDrawCurve.Parent
Dim oSheet As Sheet = oView.Parent
Dim oDrawDoc As DrawingDocument = oSheet.Parent

Dim TextPoint As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(oView.Center.X, oView.Top - oView.Height - 2)

Dim RightCircleIntent As GeometryIntent = oSheet.CreateGeometryIntent(oDrawCurve,kCircularRightPointIntent)
Dim LeftCircleIntent As GeometryIntent = oSheet.CreateGeometryIntent(oDrawCurve,kCircularLeftPointIntent)

Dim x As LinearGeneralDimension = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(TextPoint,RightCircleIntent,LeftCircleIntent)

x.Text.FormattedText = "Ø" & "<DimensionValue/>"

 

0 Likes