Inventor General Discussion

Inventor General Discussion

Reply
Valued Contributor
dpsmith85
Posts: 84
Registered: ‎03-07-2011
Message 1 of 5 (4,344 Views)

Color multiple parts in an assembly

4344 Views, 4 Replies
10-14-2011 05:19 AM

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

*Expert Elite*
harco
Posts: 879
Registered: ‎02-16-2006
Message 2 of 5 (4,326 Views)

Re: Color multiple parts in an assembly

10-14-2011 12:18 PM 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.

*Expert Elite*
cwhetten
Posts: 1,090
Registered: ‎09-03-2008
Message 3 of 5 (4,299 Views)

Re: Color multiple parts in an assembly

10-17-2011 10:27 AM 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.

 

 

*Expert Elite*
swalton
Posts: 1,307
Registered: ‎06-19-2006
Message 4 of 5 (4,289 Views)

Re: Color multiple parts in an assembly

10-17-2011 11:04 AM 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.




Inventor 2014
Vault Professional 2014
New Member
thimal888
Posts: 1
Registered: ‎10-05-2012
Message 5 of 5 (3,920 Views)

Re: Color multiple parts in an assembly

10-05-2012 10:25 AM 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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.