Right-click the Window State input of the Setup Window VI and select Create»Constant from the shortcut menu. Set the value of the constant to Open, Maximized, or Minimized.
Note If you set Window State to Hidden, you cannot see the scene window when you run the VI.
Add a While Loop to the block diagram to the right of the existing block diagram objects.
Add Find
Right-click the conditional terminal of the While Loop and select Create Control from the shortcut menu to create a Boolean control. This control functions as the Stop button for the VI.
Right-click the New Window Refnum output of the Setup Window VI and select Create»Property for SceneWindow Class»Scene from the shortcut menu to create the Scene property.
Add the Scene property inside the While Loop, right-click the property, and select Change to Write from the shortcut menu.
Wire the reference output of the Set Drawable method from outside the While Loop to the Scene input of the Scene property.
Wire the New Window Refnum output of the Setup Window VI from outside the While Loop to the reference input of the Scene property.
(Optional) Configure a camera for the scene.
Right-click the reference output of the Scene property and select Create»Property for SceneWindow Class»Camera Controller»Type from the shortcut menu to create the Camera Controller:Type property.
Add the Camera Controller:Type property inside the While Loop to the right of the Scene property, right-click the property, and select Change to Write from the shortcut menu.
Wire the reference output of the Scene property to the reference input of the Camera Controller:Type property.
Right-click the Camera Controller:Type input of the Camera Controller:Type property, select Create»Constant from the shortcut menu, and set the value of the constant to Spherical or Flying.
(Optional) Add the Wait (ms) function to the While Loop to provide smoother camera movements in the scene window. If you do not add a wait to the While Loop, the 3D scene may appear to jump around when you move the camera.
Add Find
Right-click the milliseconds to wait input of the Wait (ms) function, select Create»Constant from the shortcut menu, and set the value of the constant to an integer of 1 or greater.
The following block diagram shows a configured scene window with a spherical camera controller and a Wait (ms) function in the While Loop.
Run the VI to generate the 3D scene in the scene window.
This procedure gives a basic overview of how to set up a scene window. Use the SceneWindow properties and methods to set additional configuration settings for a scene window, such as window bounds, automatic projection mode or projection matrix programmatically.
Refer to the 3D Model of Solar System VI in the labview\examples\Graphics and Sound\3D Picture Control directory for an example of a 3D scene rendered in a scene window.