Adding file to a browser folder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using the following sample code to add files to a browser folder
Public Sub AddOccurrencesToFolder()
Dim oDoc As AssemblyDocument Set oDoc = ThisApplication.ActiveDocument
Dim oDef As AssemblyComponentDefinition Set oDef = oDoc.ComponentDefinition
Dim oPane As BrowserPane Set oPane = oDoc.BrowserPanes.ActivePane
Dim oOccurrenceNodes As ObjectCollection Set oOccurrenceNodes = ThisApplication.TransientObjects.CreateObjectCollection
Dim oOcc As ComponentOccurrence For Each oOcc In oDef.Occurrences
Dim oNode As BrowserNode Set oNode = oPane.GetBrowserNodeFromObject(oOcc)
oOccurrenceNodes.Add oNode Next
Dim oFolder As BrowserFolder Set oFolder = oPane.AddBrowserFolder("My Occurrence Folder", oOccurrenceNodes)
End Sub
How do I get the files added to an existing " My Occurrence Folder" rather than creating a new one. Every time I run the code a new folder is created, it does not use the exisitng one
cheers
Matt
MattH
Product Design Collection 2026
Vault Pro 2026