一级士官
UID2684597
U币1
G币99
技术0
主题18
精华0
阅读权限30
注册时间2016-8-10
最后登录2019-8-1
在线时间49 小时
一级士官
|
各位大佬,请问有谁知道,UIStyler界面嵌套block界面时,block界面回调不了怎么解决吗?
急!不胜感激啊!!!
下面是我调用block界面的代码:
int BODY_action_51_act_cb ( int dialog_id,
void * client_data,
UF_STYLER_item_value_type_p_t callback_data)
{
if ( UF_initialize() != 0)
return ( UF_UI_CB_CONTINUE_DIALOG );
/* ---- Enter your callback code here ----- */
//调用block界面
measure_min_dist *themeasure_min_dist = NULL;
try
{
themeasure_min_dist = new measure_min_dist();
// The following method shows the dialog immediately
themeasure_min_dist->Show();
}
catch(exception& ex)
{
//---- Enter your exception handling code here -----
measure_min_dist::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what());
}
if(themeasure_min_dist != NULL)
{
delete themeasure_min_dist;
themeasure_min_dist = NULL;
}
UF_terminate ();
/* Callback acknowledged, do not terminate dialog */
return (UF_UI_CB_CONTINUE_DIALOG);
}
这个update_cb只能走一次就死掉了,block界面在UG后台无法退出,同时也不显示。
int measure_min_dist::update_cb(NXOpen::BlockStyler::UIBlock* block)
{
try
{
if(block == face_select0)
{
//---------Enter your code here-----------
}
else if(block == face_select01)
{
//---------Enter your code here-----------
}
else if(block == separator0)
{
//---------Enter your code here-----------
}
else if(block == double0)
{
//---------Enter your code here-----------
}
}
catch(exception& ex)
{
//---- Enter your exception handling code here -----
measure_min_dist::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what());
}
return 0;
}
|
|