Message 1 of 3
Finding feature name that created a DrawingCurve in IDW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to cycle through bend lines on a flat pattern in an idw to find the feature that created them. I have been able to loop through all drawing curves to find the bend lines, but have been unable to get the name of the feature that created them. I have posted the code I have below, with some pusedo code in the middle:
Function GetBendFeature(oView As DrawingView, BendName As String) As DrawingCurve Dim oReturnCurve As DrawingCurve Dim oPDoc As PartDocument = oView.ReferencedDocumentDescriptor.ReferencedDocument Dim oPDef As SheetMetalComponentDefinition = oPDoc.ComponentDefinition For Each oCurve In oView.DrawingCurves If oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendDownEdge Or oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendUpEdge Then 'start pusedo code If oCurve.parentfeature.name = FeatureName Then oReturnCurve = ocurve End If 'end pusedo code End If Next oCurve 'exit if not found If oReturnCurve Is Nothing Then MessageBox.Show("Cannot find a flange called '" & BendName & "' in '" & oPDoc.DisplayName & "'.", "Error") Exit Function End If Return oReturnCurve End Function
How can I get the reference of the feature that created these drawing curves?