Message 1 of 2
How can I allow the user to select multiple objects?

Not applicable
07-06-2015
10:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have this code designed to let the user select an object.
'Routine to allow the user select an object within an assembly Public Sub PickObject(oPart As ComponentOccurrence, strMessage As String) 'Select part or assy Set oPart = ThisApplication.CommandManager. _ Pick(kAssemblyLeafOccurrenceFilter, strMessage) 'check if nothing was selected If (oPart Is Nothing) Then Exit Sub 'verification print Debug.Print oPart.Definition.Document.FullFileName End Sub
I want to be able to let the user select several occurrences and add them to a collection. Ultimately I'm performing several operations to parts containing many solids. Right now the user has to do all of this to the top or "close to the top" assy. I'd rather let the user select a few items inside the top level assy so the code can ignore the areas that aren't of any concern.