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: 

Color multiple parts in an assembly

18 REPLIES 18
SOLVED
Reply
Message 1 of 19
dpsmith85
27280 Views, 18 Replies

Color multiple parts in an assembly

I have a large assembly model made of many different parts.  The last thing I want to do is "paint" it so I can make a drawing showing the different colors being used.  My plan is to take the entire assembly and insert it into another assembly then just change the parts to the specific colors.  I was wondering if there was a way to change the colors on multiple parts at once.  Right now I right click the part go to iproperties and then go to occurence and choose the specific color.  I know from using Solidworks that it works the opposite you click the color first and then all the parts that you want to be that color.  It works out a lot quicker.  Is there anything in Inventor that will let me do it in a similar way?  If I select multiple parts the occurence tab in the properties is greyed out.

 

Inventor Professional 2010

 

Thanks

18 REPLIES 18
Message 2 of 19
harco
in reply to: dpsmith85

Select all the parts you want using ctrl, then select the colour you want from the drop down up on the quick access bar.

colour components

 

This only sets the colour at the assembly level it does not colour the original part.

Message 3 of 19
cwhetten
in reply to: dpsmith85

Using ctrl to select everything you want to color is fine if you only need to select a few parts, but if you need to select a few hundred or more, that approach gets old REALLY fast.  You can window select everything, but if you have components inside a pattern, then that won't work.

 

Here's what I came up with.  I had an assembly that I wanted to change the color of every part, but I knew that the color could change at some point, so I didn't want to have to select hundreds of parts one by one, then have to do it again when the customer changed his mind on the paint scheme.  So I wrote an iLogic rule that cycles through every part in the assembly and changes its color for me.  And the rule is flexible enough that I can add or remove parts from the assembly and the rule still changes everything without breaking.  Here is the rule:

 

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

 

The rule uses a text user parameter called PaintColor in the assembly to get the name of the color (see the attached image).  You manually type in the name of the color you want your assembly to be (you have to type in the EXACT name of the color style you wish to use), then run the rule.

 

In the attached image you will also see an Alt_Color parameter that I used for some of my drawing views because tan printed out too darkly on a B&W printer.  The Alt_Color uses a copy of the main paint color rule, just with the parameter changed from PaintColor to Alt_Color.

 

 Assembly Paint.png

kelly.young has embedded your image for clarity

Message 4 of 19
swalton
in reply to: dpsmith85

My steps:

1. Make a new design view

2. Change the selection filter to parts from components

3. zoom out so I can see all the assembly

4. drag a selection window around the entire assembly

5. change the color in the drop down

 

This only works because my customer paints the entire assembly the same color.

You can nest design reps from the top assembly down to your lowest sub-assembly. 

 

You can also explore some of the selection tools that show up when you press shift and your right mouse button.

Steve Walton
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Inventor 2023
Vault Professional 2023
Message 5 of 19
thimal888
in reply to: cwhetten

cwhetten, that is a fantastic answer.  Very robust in that you can add new parts to an assembly and it will still keep everything a uniform color.  In general, it is better to use something like iLogic and Rules/Forms to automate design parameters, it makes it very easier for a customer to personalize a part to his needs.

 

Worked great for me, thank you.

Message 6 of 19
craig.beilby
in reply to: thimal888

An alternative approach I have just found:

 

Select one item

change it's colour in the pallet window

hold shift (without deselecting the first one)

window select the rest/single click in the assembly view.

 

Seems to ignore patterns etc, but window select does select all the way through. Might be useful to someone

Message 7 of 19
Powerman2000
in reply to: cwhetten

Hi

I try to past your rule into my iLogic rules, but I just get error message on this rule. Could you please explain / show the procedure a little more for "dummies" ? Maybe a picture showing the Edit browser for iLogic rules.

I am using Inventor 2013.

Thanks in advance.

 

Best regards

Arne

Message 8 of 19
siravi.seo
in reply to: Powerman2000

Thanks for sharing it.

Message 9 of 19
kelly.young
in reply to: Powerman2000

Hello @Powerman2000 did you set the two User Parameters of PaintColor & Alt_Color shown in their attached image?

Message 10 of 19
Powerman2000
in reply to: kelly.young

Hi Kelly.young

Thanks for the help, I got it to work now.

 

Message 11 of 19
Powerman2000
in reply to: Powerman2000

Hi Kelly.young

I find that your solution just changes the part color on assembly level.

Do you have a solution to get to change the part color on part level, but in the same way as from the assembly level, this so I can color multiple parts in one go?

Just to make it a little more difficult, I would prefer to just have painted the outside surface on the parts, this so I can have a outside painted metal beam for example yellow and metal color inside when I section the part for correct illustration use in model pictures.

Thanks

 

Message 12 of 19
johnsonshiue
in reply to: Powerman2000

Hi! There is a way to do it at part level. Here is what you need to do. Use Clear command (the colored wheel with a red cross at the top) to strip off all appearance overrides. Otherwise, it can get confusing. Assign the part to a material style you like. Then select the faces or features you want to paint -> assign an appearance to the faces or features.

This will behave like as if a layer of paint applied to the part in a different material. However, you cannot save it to Design View Rep. The part will be colored as such until you either remove the appearance overrides or you apply a different appearance to the faces or features.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 13 of 19
kelly.young
in reply to: Powerman2000

@Powerman2000 so what you're trying to do is from the assembly level, dive into a single part, select all faces, color override those faces, return to assembly, then repeat for all parts, and return to assembly level? Assuming you want them all the same color? 

 

To do one by one the method @johnsonshiue explains how to do it.

 

With iLogic that is another story, but I think it should be possible. 

 

How to override a solid body color from an assembly

How to override a solid body color from an assembly

Strip Assembly Level Color Overrides with iLogic

ilogic rule: Remove color overrides, strip color overrides, solid colors

Override color asset on face - HRESULT: 0x80020003

 

Check out these links, some are to remove, but you could change it around using some mix and match. 

 

Please select the Accept as Solution button if a post solves your issue or answers your question.

Message 14 of 19
cnguyen6Q2HH
in reply to: cwhetten

This is a nice solution and all.. except it doesn't help for beginners. 

Message 15 of 19
JDMather
in reply to: cnguyen6Q2HH

@cnguyen6Q2HH 

Can you Attach your file(s) here? 

I suspect there is an easy technique for a beginner.


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


The CADWhisperer YouTube Channel


EESignature

Message 16 of 19
cnguyen6Q2HH
in reply to: JDMather

Hi JD, thanks for reaching out so quick.

 

Unfortunately I can't. It's NDA and a huge file with assemblies within assemblies. 

 

I just want the exterior parts to be coloured green and everything left alone. There's hundreds of these parts and I rather not have to reclick them all if the director wants them a different colour. I'm trying to figure out the iLogic rule for this, but I'm not experienced in coding at all. I might just have to bother one of the senior guys ahaha

Message 17 of 19
johnsonshiue
in reply to: cnguyen6Q2HH

Hi! Please share a non-proprietary dataset that describes the requirements. It should be doable based on prior replies. Please feel free to start a new thread. Forum experts can take a look and provide some guidance.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 18 of 19
t_fransman
in reply to: dpsmith85

What If You want to change anything that os say Blue to white or green ie. ignoring things that are galvanized or rubber or semi polished? Like a look up and change by color and ignore some? Could really use this rn

Message 19 of 19
t_fransman
in reply to: t_fransman

I'd need to run it to a skeleton from the top level assembly also. W i logic. 

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

Post to forums  

Autodesk Design & Make Report