Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski 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

Computer
Jan 21, 2006
2,053
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
 
Replies continue below

Recommended for you

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
 
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