Message 1 of 4
How to keep selectset contain ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I trying to create a macro modifying several DesignViews :
-select parts to hide in several views
-for all unlocked views, hide selected parts
Here's the basic code :
Sub modif_vues() Dim oDoc As AssemblyDocument Dim oViews As DesignViewRepresentations Dim oView As DesignViewRepresentation Dim oSelectSet As SelectSet Dim oObj As Object Set oDoc = ThisApplication.ActiveDocument Set oViews = oDoc.ComponentDefinition.RepresentationsManager.DesignViewRepresentations Set oSelectSet = oDoc.SelectSet For Each oView In oViews If oView.Locked = False Then Call oView.Activate For Each oObj In oSelectSet oObj.Visible = False Next oObj End If Next oView End Sub
The problem is when the code evaluate the red line, oSelectset is cleared... Where is the problem ?