|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
5 g# Q0 G# \5 |1 z# t( u2 u
+ W' H; E0 O& l& ~5 x”static int mask_for_drawings(UF_UI_selection_p_t select, void *type)
8 t- U5 A/ F9 y, i$ M* |# w{! P) |3 u# h' u: K3 m* M
UF_UI_mask_t
" ?) C( W/ r _% T a+ ^( [; e) \ mask[1] = { { UF_view_type, UF_view_drawing_sheet_subtype, 0 } };
+ h. u5 ^& `9 w9 Z, m+ z8 u" k if (!UF_CALL(UF_UI_set_sel_mask(select,
9 {0 x# }: W9 M UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC, 1, mask)))
1 |& I& l) s' Z0 i4 [4 a1 i return (UF_UI_SEL_SUCCESS);, U7 X8 h: N6 U& Z; }7 f
else* Y) s! R1 B, Z" r
return (UF_UI_SEL_FAILURE);2 \ Y y5 x3 K) }: T! z
}3 x$ X" X+ y- @2 |
static tag_t select_a_drawing(char *prompt)' r1 w) ~* p/ q2 T% G" L
{5 _/ R1 i! X: e& g/ {
int) p" W- g/ V5 f" T. Q
resp;
6 ^4 F9 T- X+ \- D; L double* x/ x) j$ |, W1 J2 {
cp[3];
* O9 O& h" v% T2 ?0 L! @1 C tag_t
6 \0 B1 G% v, u& w drawing,
7 [* I& U6 x. D* n object,
7 w5 ^5 P; A- `4 P% a# X: q view;5 G5 p% h/ M* _! m8 |
UF_CALL(UF_UI_select_with_single_dialog("Select a drawing", prompt,
6 c2 N1 E7 _' ]7 @7 B' a2 U UF_UI_SEL_SCOPE_WORK_PART, mask_for_drawings, NULL, &resp,6 S( T- H1 [+ [3 T: \+ @( W6 U2 Y
&object, cp, &view));: y% J, }. i0 f3 Y3 ]
if (resp == UF_UI_OBJECT_SELECTED || resp == UF_UI_OBJECT_SELECTED_BY_NAME)$ ~- `7 g, q1 I; f% p. k
{' M% O% H6 |1 u3 e. I: Z& g
UF_CALL(UF_DISP_set_highlight(object, 0));) W0 k2 c, M. {' j
UF_CALL(UF_DRAW_ask_drawing_of_view(object, &drawing));4 H' e6 b- A' p" Z, p' T# g; m
return drawing;) S. j$ h! d2 J! U0 N
}
- w' [0 Q: s# y1 C* s; g else return NULL_TAG;
5 p" Z6 K3 I" v) l! N0 a8 i3 Z9 X} K7 ^* J/ Q! z7 j4 v
|
|