AnsweredAssumed Answered

Turn RealView on/off API - Assembly

Question asked by Lasse Nielsen on Mar 15, 2018
Latest reply on Mar 15, 2018 by 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

Outcomes