I'd like to be able to choose between differents appearance for the same part. But without changing the material. An exemple is anodized parts.
How can I do that ?
Make display states and you can control the appearances as required.
I already tried that. The problem is that I want a way to do that for every part, with just a click. As when I change the material.
What I'd like is only one material but being able to select in an assembly all the parts that have the same display states (assuming all the parts have the same material).
I can't do it with display states. But maybe im doing it wrong.
thank you for your answer
You might need a macro for one click to change the part appearance without changing the material
Here is the code - change RGB numbers (30,30,30) to whatever color you want
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Dim swPart As SldWorks.PartDoc
Set swPart = swModel
Dim vMatProps As Variant
Dim nErrors As Long
Dim nWarnings As Long
vMatProps = swPart.MaterialPropertyValues
'Define the RGB values (1 = RGB value 255)
vMatProps(0) = 30 / 255 'R
vMatProps(1) = 30 / 255 'G
vMatProps(2) = 30 / 255 'B
Thanks Christian, I'll try that !
Arthur, why don't you just make a copy of the material you want and change the appearance of the copy?
I could do that.
But I've to do that for a lot of different materials and a lot of different appearance for each material. My list of material will be really too long...
Retrieving data ...