Color overriding via paramerter list

Color overriding via paramerter list

cameron.frederiksen
Enthusiast Enthusiast
447 Views
4 Replies
Message 1 of 5

Color overriding via paramerter list

cameron.frederiksen
Enthusiast
Enthusiast

Hello,

 

Is there a way to override the color of an assembly via a parameter list?

 

Thank you.

0 Likes
Accepted solutions (1)
448 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Don't think you can give an assembly a color, do you mean a part?

0 Likes
Message 3 of 5

cameron.frederiksen
Enthusiast
Enthusiast

Yes, the parts of an assembly.

0 Likes
Message 4 of 5

Anonymous
Not applicable
Accepted solution
If Colour = "Red" Then
    Component.Color("Part1:1") = "Red"
    Component.Color("Part2:1") = "Red"
ElseIf Colour = "Blue"
    Component.Color("Part1:1") = "Blue"
    Component.Color("Part2:1") = "Blue"
End If

This way you need to specify the component name.

 

If you want to change every part in the assembly, depending on how many there are, you may be better using a For loop.

0 Likes
Message 5 of 5

cameron.frederiksen
Enthusiast
Enthusiast

Thank you, this worked!

0 Likes