Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Access to 3D-sketch curve in 2D-drawing view

artemijs.nille
Contributor
Contributor

Access to 3D-sketch curve in 2D-drawing view

artemijs.nille
Contributor
Contributor

I have a curve in 2D-drawing view that was created in the sketch of a 3D-modell(see picture below).

My goal is to put a diameter dimension by iLogic automaticaly.

How can access this curve?

0 Likes
Reply
315 Views
2 Replies
Replies (2)

basautomationservices
Advocate
Advocate

You can retrieve the model geometry of a curve like this:

 

Dim activeSheet As Sheet
activeSheet = ThisApplication.ActiveDocument.activeSheet

Dim crv As DrawingCurveSegment
crv = ThisApplication.CommandManager.Pick(kDrawingCurveSegmentFilter, "pick curve")

Dim dwgCrv As DrawingCurve
dwgCrv = crv.Parent

Dim modelGeom As Object
modelGeom = dwgCrv.ModelGeometry
Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.

Free apps: Smart Leader | Part Visibility Utility | Property Editor | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle


0 Likes

artemijs.nille
Contributor
Contributor

Thank you for a reply.

In your sollution i have to pick the curve manually.

How can i retrieve this curve automatically (like "GetIntent").

And how can i add a diameter dimesnion by iLogic.

 

It should work like this:

Dim Sheet_1 = ThisDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")
Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions
Dim holeDim = genDims.AddDiameter("Hole Diameter", VIEW1.SheetPoint(0.25, 0.45), VIEW1.GetIntent("HoleFace"))

and i have to get Intent from my sketch curve

0 Likes