2 Replies Latest reply on Dec 29, 2012 1:36 PM by John Girgenti

    ModelDocExtension set_DisplayMode

    John Girgenti

      Hello All,


      I am working on an application that will alter the custom properties on selected components in an assembly (SolidWorks 2012, building in C#, Visual Studio 2010). To help visualize the operation I want to be able to change the Display Mode of the selected components.  Alteringe assembly level colors, visibility, and transparency are fairly easy, but changing Display Modes for Shaded, Wireframe, HLR, Default, etc. I have not found examples for. Looking through what is available in ModelDocExtension (in the IDE) I found set_DisplayMode, and I was suprised to see that searching for this on the SW API website yields no results.  The SW API website does not list it as a member of ModelDocExtension, yet it is in SolidWorks.Interop.sldworks. The swDisplayMode_e enumeration looks to have the settings for what I need but nothing I can derive on how to set the modes. The definition of set_DisplayMode is: void set_DisplayMode(SolidWorks.Interop.sldworks.DisplayStateSetting Setting, object Flags). Looking into DisplayStateSetting seems to lead away from what I am trying to accomplish.  Does anyone have any familiarity with this task?