- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dears,
I'm trying working with DrawingViewHatchRegion to return the SolidBody.
Could you help me how to highlight the body that include a cross hatch. I'm working with these code:
Sub Main()
Dim _InventorApp As Application = ThisApplication
Dim oDOC As DrawingDocument = _InventorApp.ActiveDocument
Dim oSelectSet As SelectSet = oDOC.SelectSet
oSelectSet.Clear()
Dim oView As DrawingView = _InventorApp.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a View to Edit.")
If oView Is Nothing Then Exit Sub
If oView.ViewType = DrawingViewTypeEnum.kSectionDrawingViewType Then
Dim oSecView As SectionDrawingView = oView
If oSecView.HatchRegions.Count() > 0 Then
For Each oHR As DrawingViewHatchRegion In oSecView.HatchRegions
Dim oSB As SurfaceBody = oHR.SurfaceBody
MsgBox(oSB.Name)
'NEED CODE THAT CAN HIGHLIGHT EACH BODY HAS GOT HATCH REGION
oSelectSet.Select(oSB) 'NOT WORKING....
Next
End If
End If
End Sub
Thanks,
Solved! Go to Solution.
Link copied