Trouble placing an angle on a part when it's in an assembly with iLogic

Trouble placing an angle on a part when it's in an assembly with iLogic

harvey_craig2RCUH
Advocate Advocate
271 Views
2 Replies
Message 1 of 3

Trouble placing an angle on a part when it's in an assembly with iLogic

harvey_craig2RCUH
Advocate
Advocate

I have a drawing where I would like to place angular annotation with iLogic. This works no problem as a part on its own but within an assembly it gives me an error:

harvey_craig2RCUH_0-1724313272910.png

In this post , @Curtis_Waguespack and @MjDeck help me identify the two intents. I have followed the same procedure for accessing a part inside an assembly and I can get it to post linear dimensions. I have attached the files. The non-working rule is in DRAWING. I can place on angle on the part but not on the identical part if it's in an assembly.

 

Many thanks,

Harvey

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

Michael.Navara
Advisor
Advisor
Accepted solution

I look at your code deeply and it looks like a bug in iLogic but I'm not sure.

If I test your code, it gives me different results in GeometryIntent. The underlying geometry from part view is Face but the geometry from assembly is EdgeProxy.

This is the reason, why your code doesn't work. It is not a solution how to create angular dimension.

 

Test code:

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

Dim ViewPt_BottomMid = VIEW1.SheetPoint(0.5, 0)
Dim ViewPt_TopMid = VIEW1.SheetPoint(0.5, 1)

'Create GeometryIntents for View1 and View2
Dim view1Intent1 = VIEW1.GetIntent("094902HYD:1", "Face0", nearPoint :=ViewPt_BottomMid)
Dim view1Intent2 = VIEW1.GetIntent("094902HYD:1", "Face0", nearPoint :=ViewPt_TopMid)


Dim view2Intent1 = VIEW2.GetIntent("Face0", nearPoint :=ViewPt_BottomMid)
Dim view2Intent2 = VIEW2.GetIntent("Face0", nearPoint :=ViewPt_TopMid)

'Get model geometry type
Dim view1Type1 As ObjectTypeEnum = view1Intent1.Geometry.ModelGeometry.Type
Dim view1Type2 As ObjectTypeEnum = view1Intent2.Geometry.ModelGeometry.Type
Dim view2Type1 As ObjectTypeEnum = view2Intent1.Geometry.ModelGeometry.Type
Dim view2Type2 As ObjectTypeEnum = view2Intent2.Geometry.ModelGeometry.Type

'Print results
Logger.Debug("View1 (Assembly):")
Logger.Debug("view1Type1: {0}", view1Type1)
Logger.Debug("view1Type2: {0}", view1Type2)

Logger.Debug("View2 (Part):")
Logger.Debug("view2Type1: {0}", view2Type1)
Logger.Debug("view2Type2: {0}", view2Type2)

'Highlight results
VIEW1.ModelDocument.SelectSet.Select(view1Intent1.Geometry.ModelGeometry)
VIEW1.ModelDocument.SelectSet.Select(view1Intent2.Geometry.ModelGeometry)
VIEW2.ModelDocument.SelectSet.Select(view2Intent1.Geometry.ModelGeometry)
VIEW2.ModelDocument.SelectSet.Select(view2Intent2.Geometry.ModelGeometry)

 

Results:

MichaelNavara_0-1724327526227.png

 

 

 

0 Likes
Message 3 of 3

harvey_craig2RCUH
Advocate
Advocate

Thank you for looking into this. I will just recreate the part in this instance as the bug will probably go away as I've managed to achieve a result with similar assembly profiles.

 

Thanks,

Harvey

0 Likes