AnsweredAssumed Answered

Turn on floor shadows in render-macro

Question asked by Tim Bethlehem on Sep 26, 2019
Latest reply on Oct 3, 2019 by Tim Bethlehem

Hi,

Some time ago I made a macro (VBA) to render assemblies. This works like it should, it's based on the example from the SolidWorks help files.

We used to render projects without floor shadows. No problem there, just set the FloorShadows-property of the scene to False.

Now we do want the floor shadows. The scene and lighting has been altered to get the result we want, just a matter of turning the shadows on in the macro by changing the False into True, right?

Wrong.

Whenever I set the property to either True or False, the result is False. When I manually turn the shadows on by right clicking the scene and don't set the property at all in the macro, all is fine. But swScene.FloorShadows = True turns them off, just like swScene.FloorShadows = False does.

Printing the value in the debug-window confirms this:

Floor shadows 1: True
Floor shadows 2: False

 

Code for this output:

Debug.Print "Floor shadows 1: " & swScene.FloorShadows
swScene.FloorShadows = True
Debug.Print "Floor shadows 2: " & swScene.FloorShadows

 

Am I missing something?

 

Thanks!

Tim

Outcomes