【NX二次开发】一种简单的选择对话框
int init_proc_face(UF_UI_selection_p_t select, void* user_data) { int num_triples = 1; UF_UI_mask_t mask_triples[] = { UF_solid_type,0,20 }; if (UF_UI_set_sel_mask(select, UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC, num_triples, mask_triples) == 0) { return (UF_UI_SEL_SUCCESS); } return (UF_UI_SEL_FAILURE); } int selectPartFace(double *douDeep) { tag_t tagFace = NULL_TAG; int failcode = 0; int iSelResp = 0; double pDblCursorPosTemp[3]; tag_t tagViewTemp; tag_t tagSelOccTemp = NULL_TAG; failcode = UF(UF_UI_select_with_single_dialog("选择XXX面", "选择XXX面", UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY, init_proc_face, NULL, &iSelResp, &tagSelOccTemp, pDblCursorPosTemp, &tagViewTemp)); if (iSelResp == UF_UI_CANCEL || iSelResp == UF_UI_BACK) return(1); if (!failcode && (UF_UI_OBJECT_SELECTED == iSelResp)) { tagFace = tagSelOccTemp; UF_DISP_set_highlight(tagSelOccTemp, false); } if (tagFace != NULL_TAG) { } return failcode; }