|
本帖最后由 ahLarry 于 2012-6-29 15:49 编辑
- //------------------------------------------------------------------------------
- // Callback Name: apply_cb
- // Following callback is associated with the "changeDialog" Styler item.
- // Input: eventObject - object of UIStyler.StylerEvent class
- //------------------------------------------------------------------------------
- NXOpen::UIStyler::DialogState TriNX::apply_cb(NXOpen::UIStyler::StylerEvent* eventObject)
- {
- try
- {
- // ---- Enter your callback code here -----
- NXString List2v = changeList2->GetSelectedString();
- NXString List3v = changeList3->GetSelectedString();
- char *cue="Select Point";
- UF_UI_POINT_base_method_t base_method;
- base_method=UF_UI_POINT_INFERRED;
- tag_t point_tag;
- double base_pt[3];
- int response;
- UF_UI_point_construct(cue,&base_method,&point_tag,base_pt,&response);
- char file_name[] = "d:\\1.prt"; //导入操作的源文件
- UF_import_part_modes_t modes;
- modes.layer_mode = 0;
- modes.group_mode = 1;
- modes.csys_mode = 0;
- modes.plist_mode = 0;
- modes.view_mode = 0;
- modes.cam_mode = FALSE;
- modes.use_search_dirs = FALSE;
- double dest_csys[6]={1,0,0,0,1,0};
- tag_t group=NULL_TAG;
- int errorcode=UF_PART_import (file_name, &modes, dest_csys, base_pt, 1, &group);
- char msg[132];
- if(errorcode!=0)
- {
- UF_get_fail_message(errorcode,msg);
- uc1601(msg,1);
- }
- }
- catch (const NXOpen::NXException& ex)
- {
- // ---- Enter your exception handling code here -----
- theUI->NXMessageBox()->Show("UI Styler", NXOpen::NXMessageBox::DialogTypeError, ex.Message());
- }
- // Callback acknowledged, do not terminate dialog
- // A return value of NXOpen::UIStyler::DialogStateExitDialog will not be accepted
- // for this callback type. You must respond to your apply button.
- return NXOpen::UIStyler::DialogStateContinueDialog;
- }
复制代码 编译通过,但运行时不提示插入点而是直接插入到原点,并且命令无法结束,卡在了如下图提示:
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|