Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK 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
Jun 19, 2013
204
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.
 
Replies continue below

Recommended for you

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