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!

Macro for hiding Axis and/or planes

Status
Not open for further replies.

Jashe

Automotive
Joined
Jun 19, 2013
Messages
209
Location
US
Does anybody know where I could retrieve a macro for hiding axis and/or planes? Preferably both. When I bring parts up in TCe it is loaded with them and I don't have the time to individually hide them all.
 
I use the search tool(edit>search) or (ctrl f).
Setup your query for axis system (visible) then in the advanced tab select "or", then select plane (visible). The visible option is available if you hit the more button.
Select the search icon (not search and select). Now you can add your query as a favorite.

Once the query has been added as a favorite it will stay with your catsettings.
Now in any file select search / favorites, select your saved query and choose the "search and select" icon.
select hide/show.

You could probably record the steps to a macro, I find hitting ctrl f then favorites is quick enough.

 
This is for hiding the planes.
Code:
Set productDocument1 = CATIA.ActiveDocument

Set product1 = productDocument1.Product

Set productDocument1 = CATIA.ActiveDocument

Set selection1 = productDocument1.Selection

selection1.Search "CatPrtSearch.Plane,All"

Set visPropertySet1 = selection1.VisProperties

visPropertySet1.SetShow catVisPropertyNoShowAttr

selection1.Clear

And you can change the search to do it for the axis.
I have the same issue with a lot of parts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top