PM_SET_VIEW_PARAMETERS
Syntax
- Input arguments
-
handle view_handle Handle of the view. string keyword1 Keyword that identifies a given view parameter. (type according to parameter) keyword1_argument1, … Arguments of the parameter.
Define the view parameters by using the combinations of {"KEYWORD", arguments} listed below. Setting the parameter POINT, VDIR, VUP, LIMITS or D_TO_COP requires the view to be regenerated. In other cases the view window is cleared, but the contents are still left intact.
|
Keyword |
Arguments |
Description |
|---|---|---|
|
"POINT" |
x, y, z |
Coordinates (float) of the view origin. This point specifies the location of the front plane of the view. |
|
"VDIR" |
dx, dy, dz |
Vector components (float) of the direction vector that gives the view plane normal. The direction of the normal is set so that objects that are behind the view plane are visible in the view. |
|
"VUP" |
dx, dy, dz |
Components (float) of the direction vector for the view up vector. If VDIR is given and VUP is not (in the same call), then the default VUP vector is used. Also, VUP vector is forced to be perpendicular to the VDIR vector. |
|
"LIMITS" |
umin,umax,vmin,vmax, depth |
Dimensions (float) of the view box in the view coordinate system. If in either u or v direction min > max, then default limits are used in that dimension. Also, if depth is negative, then default depth is used. |
|
"D_TO_COP" |
distance |
Distance (float) to the center of projection, measured from the view point. If < 1, then distance is ignored and parallel projection is used. Otherwise projection type is set to be perspective. |
|
"CL_NS_LIM" |
limit |
Nominal size limit (int) that affects the visualization of the center lines for pipes. If negative, then center line visualization is disabled altogether. Otherwise pipes that have nominal size greater than this value will have center lines visualized the next time the view is regenerated or pipes are visualized. |
|
"STYLE" |
style_name |
Sets the line attribute style for a view. This can only be used for views that belong to a drawing. |
|
"VISPRMS" |
max_dev, max_segs, min_cyl_radius, min_cyl_len, min_radius, min_flange_thickness, min_plate_thickness, beam_vis_mode |
These eight values control some of the finer points of visualization, which are explained in the Plant Modeller user manual in View Properties > Visualization Parameters. |
|
"WINDOW" |
umin,umax, vmin,vmax |
The view will be zoomed so that this portion of it will become visible at maximum scale that fits in the window. Coordinates (float) are measured in the projection plane. |
|
"SHOWBOXMINP" |
x, y, z, xmin, xmax, ymin, ymax, zmin, zmax |
Opposite corners of a filter box that should be visible in the view. |
|
"ACTIVE2D" |
on_off |
Activates a 2D layer associated with a view. If the 2D layer does not exist, then it is created. |
|
"VISLEVEL_MIN" |
min_val |
Minimum object visualization level to show. |
|
"VISLEVEL_MAX" |
max_val |
Maximum object visualization level to show. |
|
"SHOW_INSULATION" |
0 … 3 |
How insulation is shown in the view: Transparent1, Transparent2, Opaque, Don't show. |
|
"SHOW_SERVICE_SPACES" |
on_off |
Whether Service Spaces are shown or not. Service Spaces are visualized by default. |
|
"SHOW_PASSAGES" |
on_off |
Whether Passages are shown or not. Passages are visualized by default. |
|
"SHOW_CABLE_WAY_SPACES" |
on_off |
Whether Cable Way Spaces are shown or not. Cable Way Spaces are visualized by default. |
|
"SHOW_HIDDEN_PROFILE_LINES" |
on_off |
Sets hidden profile line visibility for beams. |
|
"SHOW_LOCAL_HIDDEN_LINES" |
on_off |
Sets hidden line visibility for all objects except beams. |
|
"ELINE_ATTRS" |
line type, line width, line pattern length |
Line type of visible lines: |
|
"HLINE_ATTRS" |
line type, line width, line pattern length |
Line type of hidden lines: |
|
"CLINE_ATTRS" |
line type, line width, line pattern length |
Line type of center lines: |
|
"FPMARKER_SETTINGS" |
marked_id, enable_draw, min_dimension |
Determines if a certain pattern is shown for pipes, pipe insulation, air ducts or air duct insulation cut by a cross section in wireframe views. |
|
"VIEW_DIR_LOCKED" |
on_off |
Whether the view can be rotated or not. |
|
"COLOR_STYLE" |
string |
Which color style to use. This takes as argument one string that contains color style data. Style type: For example: If the style type is set to 3, the Surface Shading Style must be given. In the above example, StkR90zpIFAPjw4sG_ZcMW is the object ID of the used Surface Shading Style. |
|
"CONTENT_RULE" |
string |
This string defines what to show in a given view. First the string must define the content rule type:
If the content rule type is set to 2 or 3, there are two additional parameters:
You can use this, for example, to define a query that only allows Piping and Equipment to be shown in the view: "typ 2;cct 0;;.d2 125;.qD 40000202;.qE 0;;.d2 126;.qG 0;.li 0;.K5 1;;" |
Return Values
- Success:
-
int 0 Setting the parameters succeeded.
- Failure:
-
int -1 Failed to set the parameters.
Description
This function sets the parameters of a given open view.
Parameters are scanned out of the parameter list based on a string value (keyword) that describes the purpose of the arguments that follow. Each string is followed by a fixed number of values. All coordinates are given in the coordinate system of the model.
Function Set
Related Functions