|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
" K# `* {% w4 I% x- l
2 e. p1 A, y) T. d# ]$ i e”static int mask_for_drawings(UF_UI_selection_p_t select, void *type)
# C8 C! Z3 b' \, Q; l5 d{4 R8 g/ j8 n. F: F
UF_UI_mask_t
5 g: @& x" @+ @5 P% \: [ mask[1] = { { UF_view_type, UF_view_drawing_sheet_subtype, 0 } };5 t/ k( s9 A' m2 D
if (!UF_CALL(UF_UI_set_sel_mask(select,
6 o9 i* F7 b$ R" e' W* f6 [) a0 J UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC, 1, mask)))( w0 r/ q$ {$ X' C
return (UF_UI_SEL_SUCCESS);+ {2 \( n" M4 S/ Q
else1 U" i* [; ~5 n- M! E7 \2 H. P y" Y
return (UF_UI_SEL_FAILURE); C" o8 e; l% y$ C2 }) l
}" k+ g! `8 }" m% O
static tag_t select_a_drawing(char *prompt)
6 c" e+ {# w" Y2 B+ S; |{
5 G3 m' ?# G/ }+ t' W" ?# g4 _* k7 ]7 ^ int
& @! n" F0 ]: r4 b5 | resp;
# j- C, S4 f# ^$ p3 p# P8 U) | double" t7 T( \3 ^" b! T( R
cp[3]; f! Q0 @- X3 @) S* M& `' i' ?
tag_t
4 W" q/ T) p9 j( ?7 [ drawing,
/ q; e5 @# A! z1 c$ { object,
. x3 `# i' _' j( ? view;
, M" J8 i5 B- t/ ] UF_CALL(UF_UI_select_with_single_dialog("Select a drawing", prompt,6 w( Z. D' D2 b. X% ^
UF_UI_SEL_SCOPE_WORK_PART, mask_for_drawings, NULL, &resp,* Y! z& d: t& |9 i+ V, o* X
&object, cp, &view));
* E3 f$ L+ |' Z' a4 R7 y if (resp == UF_UI_OBJECT_SELECTED || resp == UF_UI_OBJECT_SELECTED_BY_NAME)0 b6 b. {. E& y7 `7 ]
{/ c7 h0 g% k" a. E: K8 b
UF_CALL(UF_DISP_set_highlight(object, 0));
) o+ K/ @- ?6 l( _* Y3 d4 { UF_CALL(UF_DRAW_ask_drawing_of_view(object, &drawing));/ i7 b, m* P" u+ Y8 c- F
return drawing;4 ` r- A' }! s6 a6 @) ]
}" n4 B# I) x p" ?) z- R3 i
else return NULL_TAG;; M+ d& B5 e5 V5 U \) ]% i) a5 _( ^; f
}
D' {6 g* g* f |
|