Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Apr 11, 2018
5
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
 
Replies continue below

Recommended for you

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