Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Change model color based on attribute or expression or ...

Status
Not open for further replies.

dpackard

Mechanical
Aug 17, 2009
16
0
0
US
Does anyone know of a way to change model color based on attribute or expression or anything else.

We have mold wizard parts (cooling fittings, baffles, diverters …) and the same part file could be used by different suppliers. An example would be a DME Plastic Baffle and the Progressive Brass Baffle. These are all controlled by the same spreadsheet data and the only thing that is different is the part attributes. Visually when we look at the screen they all look the same. Is there a way that we could change the color of the model based on the supplier or material attributes? This way we would have a quick visual check as to what is in the design.

p.s. – We could make a separate spread sheet and/or part model but that would make for a lot of work to go through when we have to make changes down the road.

NX 6.0.2.8
Machine type :- GenuineIntel Family 6 Model 15 Stepping 11, Intel(R) Xeon(R) CPU 5150 @ 2.66GHz
OS :- Windows NT (x64) 5.2 (Workstation) (Build 3790: Service Pack 2)
:- 64 bit software version
# Processors :- 4
Memory :- 12285Mb
Total Swap :- 31865Mb
Free Swap :- 25771Mb

 
Replies continue below

Recommended for you

Have you tried going to...

Edit -> Object Display...

...and then use the Attribute Filter to select the object(s) you wish to change the color of by entering the Attribute name and values?

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.
 
I just tried your sugestion but I was unbale to select the model after I specified the attribute.

Is there anyway this could be automated when the file is first added to the assembly using mold wizard rather than a secondary operation?

 
If the attribute you're keying on is a String attribute, while the 'name' of the attribute is not case-sensitive, the 'value' is, so it must be typed in exactly as it was entered. Also, when selecting by a string attribute we provide a range (a 'Low' and a 'High' value). Enter the exact value string into the 'Low' and at least something for the 'High', but it does not need to be anything more than a single character.

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.
 
Hi John,

I tried to do what you suggested but I was still unable to select the solid model. I have enclosed a part file that has all of the standard attributes that we currently use. Do these type of attributes work for what we are trying to do or is there something different we would need to do to change the model color based on an attribute?

 
 http://files.engineering.com/getfile.aspx?folder=23503e14-0d35-4336-9564-f15de64d4100&file=Rod.prt
Now remember, I was talking about selecting Components in an Assembly to change their colors, relative to THAT Assembly. There is no way that I'm aware of to cause the color of some Part File to change color based on the setting of some Attribute unless you write something like a KF (Knowledge Fusion) routine which would add that behavior to your model(s).

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.
 
Status
Not open for further replies.
Back
Top