I would like that the color of a surface in part is depend of the View name.
To do this I need to suppress a feature that get surface to appear in different color in other views.
I can see that it is possible to set the View:
If Colour = "Red" Then
But how to know name of the active view in part?
Many thanks for an input.
Solved! Go to Solution.
Hi and welcome to the forum!
Using your ocompdef object, you can get the name of the active view rep with the following line:
Hope this helps!
Please click "Accept as Solution" if this response answers your question.
Thanks for your reply.
I have now;
ViewName = ocompdef.RepresentationsManager.ActiveDesignViewRe
If ViewName = "Surface Treatment" Then
Feature.Color("Extrusion8") = "SFT_Magenta"
This works very well if I execute the code in part.
I run now into next question.
How tell Inventor to run the illogic code in part, if I change view representation in the assembly that containing the part with the code?
The part’s view representation is controlled by the assembly view representation.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register