- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have labelled the fillet face in the model and I have created that loops through all the DrawingCurves and identifies entity names matching matching a name I give it. This works great in a regular view but when I do the same for a detail view it doesn't work. I have a line that counts the number of entities it match to my face name I give it and it returns 0 when attempting the detail view (returns 2 for the working main view), therefore the rule does not recognise the entity in the drawing curve when in a detail view. How do I get it to recognise the entities when they're in the detail view?
My rule (use line 3 to switch the view):
Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument Dim oSheet As Sheet = oDoc.ActiveSheet Dim oView As DrawingView = oSheet.DrawingViews.Item(1)'1 for main view, 2 for detail view. Dim oModelDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument Dim oNamedEntities = iLogicVb.Automation.GetNamedEntities(oModelDoc) Dim oFace1 As Face = oNamedEntities.FindEntity("FilletFace") Dim oFilletFace1List As New ArrayList Dim oGeomIntentList As New ArrayList For Each oDrawingCurve As DrawingCurve In oView.DrawingCurves If oDrawingCurve.ModelGeometry Is oFace1 Then oFilletFace1List.Add(oDrawingCurve) oGeomIntentList.Add(oSheet.CreateGeometryIntent(oDrawingCurve)) End If Next MsgBox(oFilletFace1List.Count) 'Using this to identify if my loop is recognising face entity in the curve. Dim FilletIdentifier As Integer = 1 'Chose whick fillet to apply dimension to. 0 bottom, 1 top. Dim oGeomIntent As GeometryIntent = oGeomIntentList(FilletIdentifier) Dim PositionPt As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(oFilletFace1List(FilletIdentifier).MidPoint.X + 0.5, oFilletFace1List(FilletIdentifier).MidPoint.Y + 0.5) Dim oGenDims As GeneralDimensions = oSheet.DrawingDimensions.GeneralDimensions oGenDims.AddRadius(PositionPt, oGeomIntent)
Main on left, detail on right (files attached):
Thanks,
Harvey
Solved! Go to Solution.