Simple Material Question

Simple Material Question

matt_jlt
Collaborator Collaborator
227 Views
1 Reply
Message 1 of 2

Simple Material Question

matt_jlt
Collaborator
Collaborator
I have another question, I have a macro that i want to change my part's active render style to as material, the only problem is that i have a combo box with all of the render styles and the macro takes the selected value as the style to use. I know you can do this with:

oPartDoc.ActiveRenderStyle = _
oPartDoc.ComponentDefinition.Material.RenderStyle

but it doesn't exactly fit into the combo box. I have tried using :Nothing,As Material, "".
I added them via
Me.combobox1.AddItem ("As Material")
I am using Inv 2008 Sp1, has anyone been able to do this yes
0 Likes
228 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
The easiest solution is to add "As Material" as one of the choices in your
combo box and then special case in your combo box event to check to see if
the selected item is "As Material" and set it to the renderstyle of the
material as you already know. For all other cases you can just use the
selected name.
--
Brian Ekins
Autodesk Inventor API
0 Likes