Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

elegantly change assembly colors ?

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
1565 Views, 6 Replies

elegantly change assembly colors ?

What's the best way to do this?

1. Model parts in steel using metal-steel color.

2. Create assembly from parts.

3. Leave metal-steel as default view.

4. Create new view rep with assembly colored blue.

 

There are two ways I can do this:

A. Create new view rep "Blue".

B. Select all parts and apply blue color at assembly level. View rep associations are broken.

OR

D. Create new view reps in each part "Blue" and make the part blue in that view rep.

E. Create assembly view rep "Blue" and apply part "Blue" view reps. View rep associations are kept.

 

A-B is quick but dirty, although in Default view the associations will be kept.

D-E can be tedious in large assemblies.

Is there a quicker way to change color but keep associations?? Any other comments/suggestions welcome!

6 REPLIES 6
Message 2 of 7
cwhetten
in reply to: Anonymous

Do you have part-level view reps (besides Master) that you need to manage?  By default, parts start off with the Master view rep only, so unless you have added other view reps for some reason, you shouldn't have issues with losing view rep associativity when changing the parts' color in the assembly environment.

 

I do this with painted weldments and I don't have a problem with associativity.  I wrote a nifty iLogic rule that allows me to change the paint color and it automatically changes all parts in that assembly.  I can share it if you like.

Message 3 of 7
Anonymous
in reply to: cwhetten

Thanks. I'd be interested to see your iLogic rule. My part template has a Default view rep. The problem I've found with Master only parts is that user work features can become visible in assemblies and are difficult to keep switched off. Because it is the master view it won't save a view rep with the features hidden.

Message 4 of 7
cwhetten
in reply to: Anonymous

That's interesting.  I haven't seen any issues with turning off work feature visibility with regards to design view reps.  Usually, if I turn off the work feature visibility in the part, it stays off in the assembly, and I haven't changed it from the Master view rep.  In fact, I haven't really changed my workflow since before 2012 (the introduction of part design view reps), and I haven't seen any change in program behavior.

 

Maybe something else is going on that is causing you trouble?

 

Here is the iLogic code I use to quickly change the color of all parts in an assembly.  I use this when I am painting an assembly, and I may need to quickly change the paint color:

 

Spoiler

Dim num As Long

num = ThisApplication.ActiveDocument.ComponentDefinition.Occurrences.Count

 

jj=1

 

While jj<num+1

Component.Color(ThisApplication.ActiveDocument.ComponentDefinition.Occurrences.Item(jj).Name) = PaintColor

 

jj=jj+1

 

End While

 

iLogicVb.UpdateWhenDone = True

 

 It depends on a parameter called PaintColor.  This is a text parameter created in the usual parameters editor.  You just need to give it a value that exactly matches one of the available color styles.  I have attached an assembly file (without part files) that shows how this is implemented.  Just insert any parts you like and run the code.

 

Message 5 of 7
Anonymous
in reply to: cwhetten

I don't mind admitting these view reps confuse me. You're right that ipt master view work feature visibility does cascade through assemblies. Master view iam work feature visibility however does not. If you have a sub-assembly in an assembly with sub-assembly-level work features you can hide them using a sub-assembly view rep, apply an assembly color to parts therefore lose your view rep associativity, but the work feature stays hidden. I think this is because the sub-assembly then isn't either in master or any other defined view rep, it's just undefined. If you then add a work feature to the sub-assy and hide it, it is hidden in your default assy view but not the colored view. This may not be a problem because you can manually turn off the work feature in the colored view. It may be a problem if it cascades to many different variations of an assembly using that sub-assy.

I like your iRule. A quicker one-off way to do that same is to Select Part Priority, window select the assembly, then apply a color.

I wonder if it would be better if iam work feature visibility was linked like ipt is. I can't think why I would want work feature visibility linked to view reps. But then I've long thought that camera views should be separated out from component visibility. They are two completely different things lumped together in one definition.

Message 6 of 7
cwhetten
in reply to: Anonymous

I hear you on the iam work feature issues.

 

Personally, I don't like seeing a bunch of axes and planes scattered through my model, so I always turn work features off until I need them (and I rarely need to turn them on).  But even then, they occasionally appear anyway and I can't seem to turn them off again (or at least they won't stay off).  This happens a lot with tube & pipe runs.  It bugs me terribly.

Message 7 of 7
Anonymous
in reply to: cwhetten

I don't have the pleasure of the tube and pipe run module. What I have noticed recently though is that hidden planes become visible when I edit a sketch, can't be hidden in the sketch edit mode, then are hidden again on exit sketch edit. Clearly a programming error!! And makes editing the sketch tricky. It doesn't happen in all parts so I don't know what triggers it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report