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

Unhide solids from assembly 2

Status
Not open for further replies.

CAD2015

Automotive
Joined
Jan 21, 2006
Messages
2,079
Location
US
Hi,

I am working on a large assembly.
At last session I hide a bunch of solids, for easy view.
I didn't pick up the solids from the tree, but using the mouse.
There a lot of planes, curves, axes, etc hiden.
How could I unhide from the assembly only the solids (bodies)?


Thanks


CAD 2015
 
search for Body then select and show

'Part Design'.Body,all

Eric N.
indocti discant et ament meminisse periti
 
Something like this?

image_hniost.png


CAD 2015
 
2019-06-27_18-18-11_gn8pqm.png


Eric N.
indocti discant et ament meminisse periti
 
Code:
Language="VBSCRIPT"

Sub CATMain()

Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = productDocument1.Selection

selection1.Search "CATPrtSearch.MechanicalFeature,all"


    Set visPropertySet1 = selection1.VisProperties
    visPropertySet1.SetShow 0
    selection1.Clear
 

End Sub

Regards
Fernando

- Romania
- EU
 
Thank you!
[2thumbsup]

CAD 2015
 
Ferdo,

It didn't work...…..:

image_siheu5.png


Selecting "Yes", I got this message:

image_cz60n8.png


What was wrong?

CAD 2015
 
In the header of my code is written CATScript. What you have is a catvbs (pay attention when you open the editor in which kind of file you will create the macro).

To make it work in catvbs just put a "comment" in front of each As word.

That means

Code:
Language="VBSCRIPT"

Sub CATMain()

Dim productDocument1 'As Document
Set productDocument1 = CATIA.ActiveDocument

Dim selection1 'As Selection
Set selection1 = productDocument1.Selection

selection1.Search "CATPrtSearch.MechanicalFeature,all"


    Set visPropertySet1 = selection1.VisProperties
    visPropertySet1.SetShow 0
    selection1.Clear
 

End Sub

Regards
Fernando

- Romania
- EU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top