set_scene_3d_label_paramT_set_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param (算子)

名称

set_scene_3d_label_paramT_set_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param — 在三维场景中设置文本标签的参数。

签名

set_scene_3d_label_param( : : Scene3D, LabelIndex, GenParamName, GenParamValue : )

Herror T_set_scene_3d_label_param(const Htuple Scene3D, const Htuple LabelIndex, const Htuple GenParamName, const Htuple GenParamValue)

void SetScene3dLabelParam(const HTuple& Scene3D, const HTuple& LabelIndex, const HTuple& GenParamName, const HTuple& GenParamValue)

void HScene3D::SetScene3dLabelParam(const HTuple& LabelIndex, const HString& GenParamName, const HTuple& GenParamValue) const

void HScene3D::SetScene3dLabelParam(Hlong LabelIndex, const HString& GenParamName, const HTuple& GenParamValue) const

void HScene3D::SetScene3dLabelParam(Hlong LabelIndex, const char* GenParamName, const HTuple& GenParamValue) const

void HScene3D::SetScene3dLabelParam(Hlong LabelIndex, const wchar_t* GenParamName, const HTuple& GenParamValue) const   ( Windows only)

static void HOperatorSet.SetScene3dLabelParam(HTuple scene3D, HTuple labelIndex, HTuple genParamName, HTuple genParamValue)

void HScene3D.SetScene3dLabelParam(HTuple labelIndex, string genParamName, HTuple genParamValue)

void HScene3D.SetScene3dLabelParam(int labelIndex, string genParamName, HTuple genParamValue)

def set_scene_3d_label_param(scene_3d: HHandle, label_index: MaybeSequence[int], gen_param_name: str, gen_param_value: Sequence[Union[str, int, float]]) -> None

描述

set_scene_3d_label_paramset_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param sets parameters of the label LabelIndexLabelIndexLabelIndexLabelIndexlabelIndexlabel_index in the 3D scene Scene3DScene3DScene3DScene3Dscene3Dscene_3d. The name and value of a parameter must be given in GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value. It is only possible to provide one GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name,GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value pair but multiple labels. The parameter is applied to all labels in LabelIndexLabelIndexLabelIndexLabelIndexlabelIndexlabel_index

The following values can be set:

'reference_point'"reference_point""reference_point""reference_point""reference_point""reference_point"

Coordinates of the reference point, as a tuple of [X, Y, Z] coordinates. To remove the current reference point, it is possible to pass an empty tuple for 'reference_point'"reference_point""reference_point""reference_point""reference_point""reference_point". This is only possible if 'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to" is 'window'"window""window""window""window""window".

'position'"position""position""position""position""position"

Position (relative or absolute depending on the parameter 'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to") of the label, as a tuple of [Row, Column] coordinates or one of the following predefined positions: 'top_left'"top_left""top_left""top_left""top_left""top_left", 'top'"top""top""top""top""top", 'top_right'"top_right""top_right""top_right""top_right""top_right", 'left'"left""left""left""left""left", 'center'"center""center""center""center""center", 'right'"right""right""right""right""right", 'bottom_left'"bottom_left""bottom_left""bottom_left""bottom_left""bottom_left", 'bottom'"bottom""bottom""bottom""bottom""bottom", or 'bottom_right'"bottom_right""bottom_right""bottom_right""bottom_right""bottom_right".

'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to"

Relation of the position. May be 'window'"window""window""window""window""window" (fixed positioning in window coordinates) or 'point'"point""point""point""point""point" (positioning relative to the reference point). 'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to" cannot be set to 'point'"point""point""point""point""point" if the reference point has been set to an empty tuple. 值列表: 'window'"window""window""window""window""window" , 'point'"point""point""point""point""point".

Default: 'window'"window""window""window""window""window".

'text'"text""text""text""text""text"

Text of the label. Multiple Lines must be separated with '\n'"\n""\n""\n""\n""\n".

'font'"font""font""font""font""font"

Font of the text label.

Possible values: Available fonts can be queried using query_fontquery_fontQueryFontQueryFontQueryFontquery_font

Default: Font of the first window the scene is displayed in, default system font otherwise.

'text_color'"text_color""text_color""text_color""text_color""text_color"

Color of the text on the label. The available colors can be queried with the operator query_colorquery_colorQueryColorQueryColorQueryColorquery_color。In addition, the color may be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr', 'gg', and 'bb' are hexadecimal numbers between '00' and 'ff', respectively.

Possible values: 'red'"red""red""red""red""red", 'green'"green""green""green""green""green".

Default: 'white'"white""white""white""white""white".

'alpha'"alpha""alpha""alpha""alpha""alpha"

Transparency of the text label's background.

Possible values: floating point value between 0.0 (fully transparent) and 1.0 (fully opaque).

Default: 1.0

'color'"color""color""color""color""color"

Color of the label itself. The available colors can be queried with the operator query_colorquery_colorQueryColorQueryColorQueryColorquery_color。In addition, the color may be specified as an RGB triplet in the form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr', 'gg', and 'bb' are hexadecimal numbers between '00' and 'ff', respectively.

Possible values: 'red'"red""red""red""red""red", 'green'"green""green""green""green""green".

Default: 'gray'"gray""gray""gray""gray""gray".

'disp_background'"disp_background""disp_background""disp_background""disp_background""disp_background"

Flag that determines if the background of the label should be visualized.

值列表: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".

Default: 'true'"true""true""true""true""true".

'disp_connecting_line'"disp_connecting_line""disp_connecting_line""disp_connecting_line""disp_connecting_line""disp_connecting_line"

Flag that determines if the connecting line between the label and reference 3D point should be visualized.

值列表: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false".

Default: 'true'"true""true""true""true""true".

'visible'"visible""visible""visible""visible""visible"

Sets the visibility of the label. If set to 'if_point_is_visible'"if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible", the label is only visible if its reference point is visible. If the compatibility mode is enabled or no reference point is set, 'if_point_is_visible'"if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible" is equal to 'true'"true""true""true""true""true".

值列表: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false", 'if_point_is_visible'"if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible""if_point_is_visible".

Default: 'true'"true""true""true""true""true".

执行信息

参数

Scene3DScene3DScene3DScene3Dscene3Dscene_3d (输入控制)  scene_3d HScene3D, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

3D 场景的句柄。

LabelIndexLabelIndexLabelIndexLabelIndexlabelIndexlabel_index (输入控制)  integer(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index of the text label.

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

通用参数的名称。

默认值: 'color' "color" "color" "color" "color" "color"

值列表: 'color'"color""color""color""color""color", 'disp_background'"disp_background""disp_background""disp_background""disp_background""disp_background", 'disp_connecting_line'"disp_connecting_line""disp_connecting_line""disp_connecting_line""disp_connecting_line""disp_connecting_line", 'font'"font""font""font""font""font", 'position'"position""position""position""position""position", 'reference_point'"reference_point""reference_point""reference_point""reference_point""reference_point", 'relates_to'"relates_to""relates_to""relates_to""relates_to""relates_to", 'text'"text""text""text""text""text", 'text_color'"text_color""text_color""text_color""text_color""text_color", 'visible'"visible""visible""visible""visible""visible"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输入控制)  string-array HTupleSequence[Union[str, int, float]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

通用参数的值。

默认值: 'red' "red" "red" "red" "red" "red"

值列表: 'blue'"blue""blue""blue""blue""blue", 'bottom'"bottom""bottom""bottom""bottom""bottom", 'bottom_left'"bottom_left""bottom_left""bottom_left""bottom_left""bottom_left", 'bottom_right'"bottom_right""bottom_right""bottom_right""bottom_right""bottom_right", 'center'"center""center""center""center""center", 'green'"green""green""green""green""green", 'left'"left""left""left""left""left", 'point'"point""point""point""point""point", 'red'"red""red""red""red""red", 'right'"right""right""right""right""right", 'top'"top""top""top""top""top", 'top_left'"top_left""top_left""top_left""top_left""top_left", 'top_right'"top_right""top_right""top_right""top_right""top_right", 'window'"window""window""window""window""window"

结果

set_scene_3d_label_paramset_scene_3d_label_paramSetScene3dLabelParamSetScene3dLabelParamSetScene3dLabelParamset_scene_3d_label_param 在所有参数正确时返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

add_scene_3d_labeladd_scene_3d_labelAddScene3dLabelAddScene3dLabelAddScene3dLabeladd_scene_3d_label

模块

三维计量