Message 1 of 4
How to get the Total Occurrences in Active Document with API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear all,
At the right bottom corner of the Inventor window, there is number of the Total Occurrences in Active Document .
How to get this number with API ?
I tried to use
MsgBox(ToOcc.Definition.Occurrences.AllLeafOccurrences.Count.ToString & vbLf &
ToOcc.Definition.Occurrences.AllReferencedOccurrences(asmDoc).Count.ToString)
At the right bottom corner of the Inventor window, there is number of the Total Occurrences in Active Document .
How to get this number with API ?
I tried to use
MsgBox(ToOcc.Definition.Occurrences.AllLeafOccurrences.Count.ToString & vbLf &
ToOcc.Definition.Occurrences.AllReferencedOccurrences(asmDoc).Count.ToString)
but both of the results are wrong, the first is lower than the right number and the second is 0.
I guess the AllLeafOccurrences is the set for all parts, not assemblies.
The recursion way is work, but it lasts for a long time.
Please help me. Thank you!
I guess the AllLeafOccurrences is the set for all parts, not assemblies.
The recursion way is work, but it lasts for a long time.
Please help me. Thank you!