PM_CREATE_VIEW

Syntax

handle_val = PM_CREATE_VIEW ( view_name, flags, screen, display );
Input arguments
string view_name Name of the view to create. Note that this script function overwrites any existing view with the given name unless that view is currently open. The maximum length is 115 characters.
int flags What kind of view to create:

0 – Create a wireframe view.

PM_VFLG_IN_DRAWING – Create a view into a drawing. Shaded views are not allowed in drawings.

PM_VFLG_SHADED – Create a shaded view.

PM_VFLG_TEMPORARY – Create a temporary shaded view.

handle screen If 'screen' is an empty string, then this function creates a new window where the view will be displayed. Otherwise it specifies where the new window will be created. For example, you can enable OpenGL in a canvas window by defining 'screen' as the handle of the canvas window. If the value is ".DUMMY", the view is not displayed on the screen.
string display This variable is for future use. Now it is only used as an empty string.

Return Values

Success:
handle Handle to the new view.
Failure:
int 0 Failed to create the view.

Description

This function creates and opens a new view with standard parameters.

Standard parameters for a top view are: view point {(xmin+xmax)*0.5, (ymin+ymax)*0.5, zmax}, view direction is up {0,0,1}, parallel projection with default limits. You can use PM_SET_VIEW_PARAMETERS to change these. Note that no objects are visualized into the view at this stage.

The handle returned from this function is to be used in calls to other view-related script functions.

The view is not saved if the "flags" parameter specifies that the view is a temporary view.

Example

%PMS_HOME%\pm\macro\BrowseSetOGLDemo.mac