iLogic code for Visual styles - Shaded with edges

iLogic code for Visual styles - Shaded with edges

Anonymous
Not applicable
1,602 Views
2 Replies
Message 1 of 3

iLogic code for Visual styles - Shaded with edges

Anonymous
Not applicable

 

Does anyone know the script for it? Would like to have this script in my template for assemblies. So when user opens up the assembly it changes the visual style automatically.

Thanks in advance.

Alex.

0 Likes
Accepted solutions (1)
1,603 Views
2 Replies
Replies (2)
Message 2 of 3

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

When Inventor opens the document in visible mode it makes the document active and displays it in active view. At this momemt  you may change active view properties as desired.

Try the following rule:

Dim oView As View = ThisApplication.ActiveView
oView.DisplayMode = DisplayModeEnum.kShadedWithEdgesRendering
oView.Update

Then make this rule triggered by the event “After Open Document”. 

Note that Inventor document object has the collection of views, so you may also change properties of View objects in the collection Document.Views. 

 

DisplayModeEnum constants are discribed in the Inventor Programming Help:

kHiddenEdgeRendering, kIllustrationRendering, kMonochromeRendering,
kRealisticRendering, kShadedRendering, kShadedWithEdgesRendering, kShadedWithHiddenEdgesRendering, kWatercolorRendering, kWireframeNoHiddenEdges, kWireframeRendering, kWireframeWithHiddenEdgesRendering


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks o lot!

0 Likes