Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SSS148 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catia V5 force user to select Geometric Set(HybridBody) when there is another hybridbody inside it

Status
Not open for further replies.

dexer327

Automotive
Apr 17, 2017
1
1_x6szqp.png




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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor