I'm trying to set the FloorAlignment and FloorOffset properties for a scene in my macro. When I run the code below nothing changes. Am I missing something obvious?
Dim swApp As Object Dim swModel As Object Dim swConfig As Configuration Dim Scene As swScene Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc Set swConfig = swModel.GetActiveConfiguration Set Scene = swConfig.GetScene Scene.FloorAlignment = 0 Scene.FloorOffset = 0 End Sub
I have the same issue with several properties from here. How can I set these properties?
The following are also not working correctly:
Scene.FitToSWWindow = True Scene.FloorOffset = 0 Scene.FixedAspectRatio = False Scene.EnvironmentRotation = 0
Hi Layne. Try adding this:
Dim val as Boolean
val = Scene.Modify()
2016 SOLIDWORKS API Help - Modify Method (ISwScene)