|
static void do_ugopen_api(void)
1 r" s7 t2 l9 L6 r) [{2 J: h2 m( @3 X4 y) F+ @
int irc = 0;/ Y5 H* x" P0 k; I4 o# I, r
char *message = "Select Objects";6 b9 E3 u/ q7 B E# |9 q
UF_UI_selection_options_t opts;
2 f1 Y0 O3 F8 {0 r: d1 x) N UF_UI_mask_t mask[1] = {{UF_circle_type, 0, 0}};
5 m; A F1 H5 G# U O- M; |0 P5 u! K4 F; n+ ^- M
int response, count;- ?. \7 [0 q4 M1 r
tag_t objects;
- i; J& m8 j5 q# s% ] tag_p_t object;
# _6 q1 n; U' |- |/ T2 R tag_t obj;
0 W1 Y; j- ?+ s _0 G$ x3 X8 t
0 j. `! c" n" Y: z1 t& d% w opts.other_options = 0;! o" N3 |+ f0 }
opts.reserved = NULL;
. A4 E: {) H, ], _ opts.num_mask_triples = 1;
6 m% M) l$ t- \! e0 x opts.scope = UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY;
& s; m, S, R4 B! m9 Q V2 l opts.mask_triples = &mask[0];; L3 c! i& ]/ z& c
//* set selection scope to be work part & occurrence */
! _# c/ Z% W2 b) J+ c0 n irc = UF_UI_select_by_class(. Y$ X0 w1 ~7 n5 ]1 _" L1 ?
message,&opts,&response,&count,&object );
, z9 b% w* W6 |2 m, k! q //* if no error, print information about selected objects */$ q& D$ r. g1 ~% b$ Q+ r
8 R: `* e& `* T5 q d$ R/ r if(!irc)
! h, q0 A1 Z; \- S) l, i+ t: v! z: P {9 d1 J0 V1 U8 H+ Z7 h0 w# r
if (object != NULL)( V+ A7 V& y3 E4 O1 ^. r
{
1 \4 V5 h3 m( K8 R9 C4 R H0 i UF_DISP_set_highlight(object[0],0);
0 Z7 {! S3 z! Q0 @ obj = UF_ASSEM_ask_work_occurrence(); $ j+ x) x* W' G" o; N
UF_CALL(UF_WAVE_create_linked_body(object[0],obj,true,&objects));
% T3 F. p- T& p) s8 m0 k1 w UF_MODL_update();6 l0 T% K* H! s( o: Z0 S( a+ q
}
9 ~3 m: W3 X ~1 Z+ b! f, V' H) _9 H }
3 H2 I( r! y" W( V" W UF_free(object);
8 V) s' Y, K: b}6 E4 a( z( ^' P9 G0 E) H
程序实现后没反应,求高手帮忙指点,是不是我的函数找错了还是函数用错了?? |
|