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!

Attribute/Expression

Status
Not open for further replies.

bbylls

Mechanical
Feb 11, 2011
163
In NX7.5 is there an attribute/expression that can be set to HIDE a component like you can do with SUPPRESS with an expression?
 
Replies continue below

Recommended for you

Yes, you can hide a component using "suppression by expression"
RMC (right mouse click) on the component in the assembly navigation tree > suppression > toggle "controlled by expression" > enter a "1" in the space below that > apply > ok

Now look for the expression that was created and change the "1" to a "0" (zero) the component will be gone.
So: a "1" turns the component on
a "0" turns it off

I am on NX6, I assume that it is the same for 7.5
 
What you do is first set up your Suppress by Expression on the component(s) that you wish to have control over. Once this is working as desired, now create an Attribute which you will use to control the Suppression. Then in the expression system you create an expression which reads the value of the attribute and uses that value to determine whether to suppress the component or not.

It's easier to see how all of this happens if you look at a sample part file. See the file attached. There is an attribute named 'HANDLE' that if you set it's value to be anything other then 'Yes' the handle on the handle wheel will be suppressed.

Now there is a slight problem and that is that when you edit the value of the attribute, the assembly does not update at that moment (the file will be OK if you save it and reopen it, so long term, everything will be fine). If you want to see the change immediately you will need to force an update, and the easiest way to do that is to go to...

Tools -> Update -> Update for External Change]

Note that the 'weakness' in Attribute/Expression update has been fixed in the next release of NX.

Anyway, take a look at what I did and I think you will get the hang of it. However, that being said, things like this are going to be much easier to set up and utilize in the next release of NX where we are making a major update to Attributes.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Thanks for the help but suppress and hide are different, and because of a bug in NX7.5 (PR 6407356) I need to "HIDE" a component, not "SUPPRESS" it.
Hiding does not remove the part from drawings or BOM like suppress does.
 
No, I really don't think there is a way to do what you want.
You do have the ability to hide the component from the view, but not expression controlled.
assemblies > context control > hide component in view
 
You can also set the Reference Set to "empty" for the component that you want hidden. It will still show up in the parts list when you do that.
 
Sorry, I misunderstood what you were asking for. NO, there is no way that I'm aware of to control only the VISIBILTY of a Component using an Expression/Attribute.

Why are you trying to only Hide it and not Suppress it? What is the behavior/workflow that you're attempting to control using an Expression?

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Could you assign it to layer by expression? Then you could hide the layer?
 
In NX7.5 I found a bug (PR 6407356).
When in drafting, when I am doing a drawing of a plate that is part of a sub assembly, it adds another component of the plate to the main assembly. So now I have 2 of the same component in the main assembly. There are attributes to keep it out of the BOM, but in a cross section both components show up. The problem is, during modeling, I can hide the component and do some work. Then if I have to hide the whole sub-assembly to work, and then show the sud-assembly, it un-hides the extra component. Just a pain to keep tracking down the extra components. And they don't always appear in the same position as the original. Components all over the place.
I like the idea of a different layer or empty referance set. I will try that. Thanks to all.
 
Empty reference set does not work. It takes the part out of the drawing views in the drafting of the sub-assembly.
Layers does work. I put it on an unused layer in the main assembly and then turned that layer off. It still shows up in the views of the drawing, and I don't have to worry about hiding it.
Thanks again to all for your input. It's nice to know there are people out there who know about thios stuff. And of course that is why you get paid the big bucks. [thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor