Tuesday, September 24, 2013

How to hide CATIA geometry with a macro


Use selection method to select a piece or pieces of geometry in CATIA. You can do this by searching for name or by type. Now you can use the code below to hide or unhide the geometry in CATIA.



‘hide

Dim visPropertySet1 As VisPropertySet

Set visPropertySet1 = oSelection.visProperties

VisPropertySet1.SetShow catVisPropertyNoShowAttr

‘alternative method: VisPropertySet1.SetShow 1

oSelection.Clear

 

‘unhide

Set visPropertySet1 = oSelection.visProperties

VisPropertySet1.SetShow catVisPropertyShowAttr

‘alternative method: VisPropertySet1.SetShow 0

oSelection.Clear

 

To learn more try this free CATIA macro exercise to search by name.

No comments:

Post a Comment

I'd love to hear from you!