CATIA V5 Script to Show only Solids
CATIA V5 Script to Show only Solids
(OP)
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
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





RE: CATIA V5 Script to Show only Solids
http://www.eng-tips.com/viewthread.cfm?qid=298847
There are examples of hiding items in products. This may shed some light on your issue.
Regards,
Derek
RE: CATIA V5 Script to Show only Solids
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