I will appreciate any help with this question.
The following code returns a list of the render style names in Inventor 2014 :
Dim colorList As New ArrayList
For Each style As RenderStyle In ThisDoc.Document.RenderStyles
colorList.Add(Style.Name)
Next
MultiValue.List("primary_color") = colorList
iProperties.Value("Summary", "Comments") = _
ThisApplication.ActiveDocument.ActiveRenderStyle.Name
The code returns a list of render style names:
Gold-Metal
Gunmetal-Polished
Titanium-Polished
Steel Blue
Silver
and more . . .
If I use these names in an iLogic rule to set the part color:
iProperties.PartColor="Gold-Metal"
I get an error (system argument exception).
The correct argument is:
iProperties.PartColor="Gold Metallic"
The following render style names also return an exception:
iProperties.PartColor="Gunmetal-Polished"
iProperties.PartColor="Titanium-Polished"
The correct arguments are:
iProperties.PartColor="Gunmetal (New/Polished)"
iProperties.PartColor="Metal-Titanium (Polished)"
Where/how can I get a list of correct color style names to use in iLogic rules in Inventor 2014 ?
Thank you for considering my request.
Solved! Go to Solution.
Solved by Vladimir.Ananyev. Go to Solution.
Could you please test iLogic rules in the attached part model. They works for me.
This rule populates multi-value parameter with the styles names:
MultiValue.SetValueOptions(True, DefaultIndex := 0) Dim colorList As New ArrayList For Each style As RenderStyle In ThisDoc.Document.RenderStyles colorList.Add(Style.Name) Next MultiValue.List("primary_color") = colorList Beep MsgBox("Done")
This rule changes active style:
iProperties.PartColor = primary_color iProperties.Value("Summary", "Comments") = _
ThisDoc.Document.ActiveRenderStyle.Name
cheers,