Message 1 of 9

Not applicable
07-01-2015
02:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am extracting primitives of the clicked modelitem to get points, edges, faces.
This works most of the time, but for some items the collection of fragments is not for the clicked item only, it is for multiple independant items in the tree. Is there a way to check the fragments are from the same object?
I am using this very simple code:
Dim Itm As ModelItem = Autodesk.Navisworks.Api.Application. ActiveDocument.CurrentSelection.SelectedItems(0) Dim ItmPath As InwOaPath = ComApi.ComApiBridge.ToInwOaPath(Itm) For Each frag As InwOaFragment3 In ItmPath.Fragments 'this collection contains fragments from multiple items frag.GenerateSimplePrimitives(nwEVertexProperty.eNORMAL, Me) 'Me is a class that implements InwSimplePrimitivesCB Next
In the picture below, if I try to extract the geometry for any of the selected item (in blue), it returns the fragments for all of them.
If I click any other item, it returns the fragments for the clicked object only...
Cheers,
Nic
Solved! Go to Solution.