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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

select geometrical set without click 1

Status
Not open for further replies.

RubenSilva

Mechanical
Joined
Apr 11, 2018
Messages
5
Location
PT
Hello

i have a macro that every time i run i have to selelct the geometrical set, but its always the same

I use this code to select the Geometrical Set:
Code:
Status = MySelection.SelectElement2(vFilter, "Select Geometrical Set", True)
There are another way to use always the same Geometrical Set without clicking there? Just pre-define on the code what is the Geometrical Set

Ruben
 
if your GeoSet is right under Part then it is just one HybridBodies level, otherwise you will have to "dig down" to the correct level...

Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
Dim MySelection As Selection
Set MySelection = partDocument1.Selection
Dim part1 As part
Set part1 = partDocument1.part
Dim myHBody As HybridBody
Set myHBody = part1.HybridBodies.Item("inWork")

MySelection.Add myHBody

regards,
LWolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top