|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
各位大侠,是这样的,我想选择UG中的一些特征,用UF_UI_select_with_class_dialog这个函数,可是回调后弹出对话框说是什么“对话框区域2当前不可用”,请各位大侠帮忙啊,以下是代码
private static Session theSession;
private static UI theUI;
public static Final theFinal;
private Dialog theDialog;
private NXOpen.UIStyler.DialogItem changeDialog;
public static bool isDisposeCalled;
private static UFSession theUFSession;
static int sel_init_proc(IntPtr select_, IntPtr user_data)
{
int num_triples = 2;
UFUi.Mask[] mask_triples = new UFUi.Mask[2];
// UFUi.Mask[] maks_triples = new UFUi.Mask[2];
/* enable only lines and edges */
mask_triples[0].object_type = UFConstants.UF_line_type;
mask_triples[0].object_subtype = 0;
mask_triples[0].solid_type = 0;
mask_triples[1].object_type = UFConstants.UF_solid_type;
mask_triples[1].object_subtype = 0;
mask_triples[1].solid_type = UFConstants.UF_UI_SEL_FEATURE_ANY_EDGE;
theUFSession.Ui.SetSelMask(select_, UFUi.SelMaskAction.SelMaskClearAndEnableSpecific, num_triples, mask_triples);
return UFConstants.UF_UI_SEL_SUCCESS;
}
public void final()
{
theUI = UI.GetUI();
theSession = Session.GetSession();
theUFSession = UFSession.GetUFSession();
string cue = "请选择所需要的体";
string title = "请选择需要的体";
int response;
int count;
Tag[] objects;
int scope = UFConstants.UF_UI_SEL_SCOPE_WORK_PART;
// int scope=UF_UI_SEL_SCOPE_WORK_PART;
theUFSession.Ui.SelectWithClassDialog(cue, title, scope, sel_init_proc, (IntPtr)0, out response, out count, out objects);
}
|
|