关于 在Block UI中UF_initialize();和UF_terminate();的使用
1 用Block UI作NX二次开发的时候,不需要在使用UFUN函数的时候加UF_initialize();和UF_terminate();。 2 可以直接加在CPP里这个位置: 3 4 extern "C" DllExport void ufusr(char *param, int *retcod, int param_len) 5 { 6 TwoPointCyl *theTwoPointCyl = NULL; 7 try 8 { 9 UF_initialize();//初始化 10 11 theTwoPointCyl = new TwoPointCyl(); 12 // The following method shows the dialog immediately 13 theTwoPointCyl->Show(); 14 15 UF_terminate();//终止 16 } 17 catch(exception& ex) 18 { 19 //---- Enter your exception handling code here ----- 20 TwoPointCyl::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); 21 } 22 if(theTwoPointCyl != NULL) 23 { 24 delete theTwoPointCyl; 25 theTwoPointCyl = NULL; 26 } 27 } 28
原文地址:https://www.cnblogs.com/nxopen2018/p/10976071.html
时间: 2024-11-03 23:42:22