Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA V5 Script to Show only Solids 1

Status
Not open for further replies.

jmarkus

Mechanical
Jul 11, 2001
377
This has been discussed many times before, but I am trying to understand why my application of this concept won't work.

I can perform the following:
Edit->Search->Advanced and enter
.-'Part Design'.'PartDesign Feature'
in the Composed query.
Select Look: Visible on Screen and click "Search and Select" and it will highlight everything that is not a solid in my product or part.

When I try to put this into a macro as:
=========================================
Language="VBSCRIPT"

Sub CATMain()

Set productDocument1 = CATIA.ActiveDocument

Set selection1 = productDocument1.Selection

selection1.Search type!='PartDesign Feature',scr

selection1.VisProperties.SetShow 1

selection1.clear

End Sub
==========================================

it doesn't work.

Can't someone show me the error of my ways?

Thanks,
Jeff
 
Replies continue below

Recommended for you

Cool Help file, thanks!

Here is what I ended up doing, I replaced the search type with:
======================
selection1.Search "t!=Part*&t!=Product*&t!=Surface,scr"
======================
and that seemed to do the trick. (I added the surface type to keep surfaces displayed from what I originally intended in my first post.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor