|
int tt::update_cb(NXOpen::BlockStyler::UIBlock* block); |6 D6 w# z+ J3 D8 R$ S
{
3 E# G) Z7 }. P( z& d: U! Z' p try% Y7 P) ~6 ?. ]4 H( G
{
; B/ t; G2 _" i5 F! q if(block == string0)3 E- E6 e; F6 P; z4 ?0 Y- x
{/ D+ F( V2 C" K3 h2 n
//---------Enter your code here-----------
) m3 D+ \/ v7 b8 { }5 E" K+ ~' ~' x% o5 m
else if(block == string01)" U* m& i+ B; n5 d* R
{' L; f( r4 @/ Y
//---------Enter your code here------------ l$ Z' p6 N/ x0 E1 N! a. Y
}' h7 v* [$ a% d
} ~! N. u1 j1 i; @4 y/ _
catch(exception& ex)' i$ y7 P7 ], N
{
# b& r8 M+ a' h& b, p //---- Enter your exception handling code here -----% w- T. B& M* b6 `, C: m
tt::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox: ialogTypeError, ex.what());# S' n$ T( x0 h6 \' p$ k5 x3 |7 S6 ?+ x
}
3 y. J) j+ E2 k' X y, c2 c return 0;
1 B8 }" x1 W5 t* C}
* @' D* G/ v- o4 ^+ v7 A在UPDATE里面写了 if(block == xxx)就是该控件有更新时会自动执行 |
|