Creating a dimension from edge of circle with a face

Creating a dimension from edge of circle with a face

phucminhnguyen.76
Observer Observer
231 Views
3 Replies
Message 1 of 4

Creating a dimension from edge of circle with a face

phucminhnguyen.76
Observer
Observer

Hi everyone, I started to use iLogic and create Rules in my projects recently.

I would like to create a dimension like my attached image.

 

Does someone has the iLogic experience to help me?

Thanks!

OK.pngN_OK.png

0 Likes
232 Views
3 Replies
Replies (3)
Message 2 of 4

JBerns
Advisor
Advisor

@phucminhnguyen.76 ,

 

Did you ever find a solution to this request?

 

I too must dimension to the quadrants of circular faces. (Using Inventor 2025)

JBerns_0-1758117177783.png

 

I would likely need to know how to dimension to any of the quadrants, depending on the drawing view and model orientation.

 

Thank you for your time and attention. I look forward to your reply or others than can offer a solution.

 

Regards,

Jerry

-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
0 Likes
Message 3 of 4

WCrihfield
Mentor
Mentor

I do not do a lot of drawing annotations automation, but I may be able to help a bit.  Are you using the Inventor API tools for drawing dimension creation, or the uniquely iLogic API tools?  In both situations, one of the 'Optional' inputs that the GeometryIntent creation method asks for is a variation of the PointIntentEnum.  There are variations of that Enum specifically for specifying common points in circular scenarios (as well as rectangular, axial, and planar) which should work, as long as the drawing curve geometry supports that Enum variation.  Then, the iLogic API methods allow us to specify yet another optional helper called a CurveChoiceSpec.  It's description is:  "If more than one drawing curve is found, chooses the one whose bounding box center is closest to this point."  It uses a DocumentUnitsPoint2d type object for the actual location.  Those can be created using the IManagedDrawingView.SheetPoint Method, or the ThisDoc.Geometry.Point2D Method.

 

Methods for Creating GeometryIntent:

Sheet.CreateGeometryIntent (Inventor API method)

IManagedDrawingView.GetIntent Method (String, PointIntentEnum, CurveChoiceSpec) (iLogic API method)

IManagedDrawingView.GetIntent Method (ComponentArgument, String, PointIntentEnum, CurveChoiceSpec) (iLogic API method)

GeneralDimension creation methods source objects:

GeneralDimensions (Inventor API object)

IManagedGeneralDimensions Interface (iLogic API object)

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 4 of 4

JBerns
Advisor
Advisor

@WCrihfield (Wes),

 

As always, very useful info. I was certain that I looked at that PointIntentEnum list and did not see those Circular (Left/Right/Top/Bottom) options. 🙄

 

Using iLogic method I have the code working. In case others are interested, here is my code:

 

' Get sheet and view
Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")

' Get named entities
Dim VFB_Face_Left = VIEW1.GetIntent("Vert_Flat_Bar_01", "Face_Left", PointIntentEnum.kEndPointIntent)
Dim VFB_Face_Bottom = VIEW1.GetIntent("Vert_Flat_Bar_01", "Face_Bottom", PointIntentEnum.kEndPointIntent)
Dim VRB_Face_Cylinder_Right = VIEW1.GetIntent("Vert_Rnd_Bar", "Face_Cylinder", PointIntentEnum.kCircularRightPointIntent)
Dim VRB_Face_Cylinder_Top = VIEW1.GetIntent("Vert_Rnd_Bar", "Face_Cylinder", PointIntentEnum.kCircularTopPointIntent)

' Declare access to drawing dimensions
Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions

' Add the dimensions
Try
	genDims.AddLinear("Dim01", VIEW1.SheetPoint(0.5, -0.1875), VFB_Face_Left, VRB_Face_Cylinder_Right, DimensionTypeEnum.kHorizontalDimensionType)
	genDims.AddLinear("Dim02", VIEW1.SheetPoint(-0.03125, 0), VFB_Face_Bottom, VRB_Face_Cylinder_Top, DimensionTypeEnum.kVerticalDimensionType)
Catch ex As Exception
	MsgBox("Error: ", ex.Message )
End Try

 

JBerns_0-1758297684833.png

 

Regards,

Jerry

-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
0 Likes