|
int tt::update_cb(NXOpen::BlockStyler::UIBlock* block)! x. A( E, S* O5 y; e
{* {8 O7 f2 x, u5 {$ U+ E
try
2 j7 ?( p, p# q" K- M {
6 X. j: {! S9 {6 g* h if(block == string0)& l( L: u# ?' [3 O
{
# l' v# r" d& {+ y //---------Enter your code here-----------; h6 y' _: W0 {" ?- u7 h
}5 H. ], s) i2 v: u, W: u- y% b
else if(block == string01)& ?" [" |5 S1 H- x* c
{
7 ?9 T1 _% {; P( D2 L( E; K7 |7 q //---------Enter your code here-----------) Y+ E, ?5 V/ l0 U( f2 x
}" x5 \' X4 x- l ^
}
/ S5 O8 J( s! @1 r' y catch(exception& ex)3 J5 y' H9 F/ W
{
7 r$ @. J0 o& h+ N7 U X. V4 X- \ //---- Enter your exception handling code here -----! [1 b9 t( T& M7 a+ E
tt::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox: ialogTypeError, ex.what());
$ b: v" ^1 a! u1 A+ f! C }
5 }. n+ k3 H# y( R5 z5 U5 K5 z return 0;
* D& [/ C5 Z, S$ n}( b; M8 W5 n! d
在UPDATE里面写了 if(block == xxx)就是该控件有更新时会自动执行 |
|