dexer327
Automotive
- Apr 17, 2017
- 1

As shown in the image there is HybridBody(Repetition(Points and Planes))) inside a HybridBody(Geometric set CSYS). I want to force the user to select only Geometric set(CSYS) instead of Repetition(Points and Planes))) using filter.
The problem is since both Geometric set and Repetition(Points and Planes))) are HybridBody, I'm not able to force the user to select only Geometric set.
[tt]Dim varFilter(1) As Variant
Dim objSel As Selection
Dim objSelLB As Object 'Variable declared as object
Dim strReturn As String
Dim strMsg As String
'Only below geometric types will be selected
varFilter(0) = "Body" 'Body represents a solid body
varFilter(1) = "HybridBody" 'HybridBody represents a geometrical set
Set objSel = CATIA.ActiveDocument.Selection
Set objSelLB = objSel
strMsg = "Select a geometrical set."
strReturn = objSelLB.SelectElement2(varFilter, strMsg, False)[/tt]