6 Replies Latest reply on Apr 19, 2017 1:44 PM by Layne Fowler

    Set scene properties - FloorAlignment and FloorOffset

    Layne Fowler

      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