NX二次开发UF_UI_select_conehead 函数介绍

137 阅读3分钟

UF_UI_select_conehead

Defined in: uf_ui.h 
int UF_UI_select_conehead(char * message, int num, double origins [ ] , double directions [ ] , char * * labels, UF_DISP_conehead_attrb_s * attributes, double selection_point, int display_coneheads, int * selected_num, int * response )

overview 概述

Displays the given coneheads and allows the user to select one of them. The coneheads are described using the standard conehead attributes. Each conehead has a selection point. The location of the selection point is set by the input parameter selection_point. The user is then prompted for a screen location, and the conehead whose selection point is closest, is returned to the caller.

The selection_point parameter may be any value in the range 0.0 to 1.0. A value of 0.0 sets the selection point to the base of each conehead. 1.0 sets the selection point to the tips.

The display_coneheads flag determines if, all the coneheads, none of the coneheads, or just the selected conehead, is left displayed when the function ends. The selected coneheads selection point is marked with a small circle.

The user can choose Back or Cancel without selecting a conehead. UF_DISP_set_conehead_attrb describes how to set conehead attributes.


显示给定的锥头,并允许用户选择其中之一。使用标准的 conehead 属性描述 conehead。每个锥头都有一个选择点。选择点的位置由输入参数 select _ point 设置。然后提示用户输入屏幕位置,并将选择点最近的锥头返回给调用者。Select _ point 参数可以是范围在0.0到1.0之间的任何值。如果值为0.0,则将选择点设置为每个锥头的底部。0将选择点设置为提示。Display _ conehead 标志确定在函数结束时是否显示所有的 conehead,没有任何 conehead,或者只显示所选的 conehead。选定的锥头选择点用一个小圆圈标记。用户可以选择 Back 或 Cancel,而无需选择 conehead。UF _ DISP _ set _ conehead _ attrb 描述了如何设置 conehead 属性。

UFUN例子

获取源码例子请搜索 里海NX二次开发3000例专栏

parameters 参数

char *messageInputThe cue line message. (80 character maximum)
提示线消息。(最多80个字符)
intnumInputThe number of coneheads to display.
要显示的锥头数量。
doubleorigins [ ]InputAn array of conehead origin points. Contains num3 entries.
锥头原点的数组。包含 num3条目。
doubledirections [ ]InputAn array of conehead directions. Contains num3 entries.
锥头方向的数组。包含 num3条目。
char * *labelsInputAn array of pointers to character string labels to be placed on the coneheads. If no labels are desired this may be passed as NULL. Individual entries may also be set to NULL. Contains num entries.
指向要放置在锥头上的字符串标签的指针数组。如果不需要任何标签,这可以作为 NULL 传递。单个条目也可以设置为 NULL。包含数字项。
UF_DISP_conehead_attrb_s *attributesInputAn array of conehead attribute structures If this is set to NULL, the current conehead attributes are used for all the coneheads. For a description of this structure and how to set the current conehead attributes see UF_DISP_set_conehead_attrb. Contains num entries.
Conehead 属性结构的数组如果设置为 NULL,则所有的 conehead 都使用当前的 conehead 属性。有关此结构以及如何设置当前 conehead 属性的说明,请参见 UF _ DISP _ set _ conehead _ attrb。包含数字项。
doubleselection_pointInputDetermines where the selection points are on the coneheads. This is given as a fraction of the total conehead length, 0.0 to 1.0.
确定选择点在锥头上的位置。这是作为总锥头长度的一部分给出的,0.0到1.0。
intdisplay_coneheadsInputWhich coneheads will remain displayed on ReturnUF_UI_DISP_NONE UF_UI_DISP_SELECTED UF_UI_DISP_ALL
哪些锥头将继续显示在 Return nUF _ UI _ DISP _ NONE UF _ UI _ DISP _ SELECTED UF _ UI _ DISP _ ALL 上
int *selected_numOutputThe conehead that was selected. 1 to num. Only valid if response = UF_UI_OK.
选择的 conehead。1到 num。只有当 response = UF _ UI _ OK 时才有效。
int *responseOutputIndication of the users response: UF_UI_OK UF_UI_BACK UF_UI_CANCEL
用户响应的指示: UF _ UI _ OK UF _ UI _ Back UF _ UI _ CANCEL