Anonymous
310 Views, 1 Reply
06-20-2017
01:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-20-2017
01:47 PM
Rename Browser nodes from an Assembly and all Parts to default
Hello all,
how to reset assembly browser node to default
recursively.
Thanks, regards
Massimo
Anonymous
in reply to:
Anonymous
06-20-2017
02:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-20-2017
02:44 PM
Here's one approach...
Dim oAsmDef as AssemblyComponentDefinition
oAsmDef = oAsmDoc.ComponentDefinition
Dim oLeafOccs as ComponentOccurrencesEnumerator
oLeafOccs = oAsmDef.Occurrences.AllLeafOccurrences
Dim oPane As BrowserPane
oPane = oAsmDoc.BrowserPanes.Item("Model")
' Iterates thru the occurrences and resets the name
Dim oOcc as ComponentOccurrence
For Each oOcc in oLeafOccs
Dim oNode As BrowserNode
oNode = oPane.GetBrowserNodeFromObject(oOcc)
' reset name
oNode.NativeObject.Name = ""
Next