3 Replies Latest reply on Mar 15, 2018 7:34 AM by Lasse Nielsen

    Turn RealView on/off API - Assembly

    Lasse Nielsen

      Hi SolidWorks forum,


      I trying to create a macro for exporting an assembly as an image. In this process I need to make sure that RealView graphics is enabled in an assembly.


      I have tried the following which i thought was according the API help, but something as far as I can see swMaterial need to bet set first?


      Dim swApp As SldWorks.SldWorks

      Dim swModel As SldWorks.ModelDoc2

      Dim swMaterial As SldWorks.MaterialVisualPropertiesData


      Sub main()


          Set swApp = Application.SldWorks

          Set swModel = swApp.ActiveDoc

          swMaterial.RealView = True



      From API Help

      Dim instance As IMaterialVisualPropertiesData

      Dim value As System.Boolean

      instance.RealView = value