×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to Hide Elements using a Rule?

How to Hide Elements using a Rule?

How to Hide Elements using a Rule?

(OP)
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?

RE: How to Hide Elements using a Rule?

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?

RE: How to Hide Elements using a Rule?

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources