Example Codes

For those of you who have written Simulation API's have you ever had to use this snip of code and if so do you have an example of it being used in a VBA macro. Please help!

https://help.solidworks.com/2020/english/api/swsimulationapi/SolidWorks.Interop.cosworks~SolidWorks.Interop.cosworks.ICWThermalStudyOptions~UseTemperatureFromThermalStudy.html

Dim instance As ICWThermalStudyOptions
Dim value As Integer


instance.UseTemperatureFromThermalStudy = value
value = instance.UseTemperatureFromThermalStudy

or


instance.ThermalStudyNameUsedForInitialTemperature = value
value = instance.ThermalStudyNameUsedForInitialTemperature

'Says that the previous study was called thermal 1 for initializing initial conditions
ThermalOptionsObj.ThermalStudyNameUsedForInitialTemperature = "Thermal 1"
'1 = Use initial temperature from the thermal study
'0 = Do not use initial temperature from the thermal study

SolidworksApi/macros