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!

How to Hide Elements using a Rule?

Status
Not open for further replies.

roseda

Automotive
Oct 4, 2001
90
I want to no-show certain elements depending on the value of a parameter.

Within the Rule function, I can make the \activity =FALSE but this de-activates the elements.

I have also tried creating a macro but the macro does not record anything when I no show the elements.

Can anyone help?
 
Replies continue below

Recommended for you

I think you will find this tricky( or nigh impossible) with only a rule.
What is the basis for hiding the element.
Is it not overkill to use a parameter to hide the element.

What are you really trying to achieve?
 
I have managed to do it by first creating a macro (see below) which searches for the planes that I want (they all have "HeadtoBlock" in the title) and then using visproperties to no show them.

I then call up this macro from within the rule using:
LaunchMacroFromDoc("MacroName")

MACRO:
Language="VBSCRIPT"
Sub CATMain()
Set partDocument1 = CATIA.ActiveDocument
Set selection1 = partDocument1.Selection
selection1.Search "Name=*HeadtoBlock*,all"

Set visProperties1 = CATIA.ActiveDocument.Selection.VisProperties
visProperties1.SetShow catVisPropertyNoShowAttr
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor