1、UF_UI_select_with_single_dialog (#include <uf_ui.h> )
char title[]="";
char cue[] = "";
int response=0;
double cursor [3];
tag_t face = NULL;
tag_t view = NULL;
if(!UF_CALL(UF_UI_select_with_single_dialog( cue, title, UF_UI_SEL_SCOPE_NO_CHANGE, init_proc_face, NULL, &response,&face,cursor ,&view)))
{ if (response == UF_UI_OBJECT_SELECTED || response == UF_UI_OBJECT_SELECTED_BY_NAME)
{
printf("object tag = %d\n", face);
}
UF_DISP_set_highlight(face, 0);//关高亮
}
2、UF_UI_select_with_class_dialog (#include <uf_ui.h> )
void class_sel_dlg(int *count,tag_p_t *objects)
{
char cue[] = "";
char title[] = "";
int response, sel_count, i; tag_p_t sel_objects;
if((UF_CALL(UF_UI_select_with_class_dialog( cue, title, UF_UI_SEL_SCOPE_NO_CHANGE, , NULL, &response, &sel_count, &sel_objects))) == 0)
{
printf("object count = %d\n",sel_count);
if (response == UF_UI_OK && sel_count > 0)
{
*objects=sel_objects; *count=sel_count;
for (i=0; i<sel_count; i++)
{
printf("object tag = %d\n", sel_objects[i]);
UF_DISP_set_highlight(sel_objects[i], 0);
}
UF_free(objects);
}
}
}