Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Apr 17, 2017
Messages
1
Location
IN
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

Back
Top