|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发中常用的ufun API函数大集合,熟悉这些就够了3 J6 K; s, i* |: @1 l
3 H9 k- Y! c4 J+ \" O7 i/ t! p2 {
这些函数是经常使用的,可以作为参考!
2 z' r0 y& Z7 h. R+ R / ^5 O3 m- |: N, M7 N) S* p# t
(1)和Part有关1 |1 W6 ^( T; v& q3 l8 B
UF_PART_open, v* E& g' \; C, g0 n" r
UF_PART_close_all
- C/ r+ {+ |" e5 t V9 M2 V8 T UF_PART_save_all( m1 r0 ~8 @$ }! D
UF_PART_ask_part_name
% y" @8 w: a% K* r4 C3 E( P UF_PART_ask_part_tag7 }% q6 K/ \- o( ^* h
UF_PART_ask_units6 J9 F ?" j8 e8 C' w1 E# S/ J
UF_PART_ask_display_part3 ?) m" H$ `8 h- r
UF_PART_set_display_part. k4 Z, n4 S$ B/ y1 _7 T+ d( |
UF_PART_is_modified$ _- U' @! N7 e$ x% J$ E
% H5 b1 c/ K, }" G7 O9 F5 z(2)和菜单有关
$ V$ f7 ^( z6 a% O: Yuc1601 — Display a Simple Message on the Cue line
# x+ W; @' E0 E7 j+ W6 e6 e/ BUF_UI_set_status
9 y, [* i: ^, K$ _( |UF_UI_set_prompt
" t- T' ]$ u3 Q/ v- \uc1603— Display Selection Menu+ _; S) e- g2 X9 }- S; q+ S& r
uc1605— Multiple Selection Menu
( s( r- ]( z" d m" O(3)和选择显示有关3 F2 A. F1 w( ~, I+ b: K7 P
UF_UI_set_select_mask% h5 ?' _ k% ^8 r, W' J
UF_UI_select_with_class_dialog0 M# l: Y$ d) a2 I
UF_UI_select_with_single_dialog
4 c6 n, {7 U% q. o" M3 MUF_UI_set_sel_mask1 Z p9 a- `! P7 r6 R8 U
UF_DISP_set_highlight
: p/ i8 i! C/ P' b3 p3 g0 H6 |8 JUF_DISP_set_display
5 j. \" w7 ~6 [. [! |: ZUF_DISP_add_item_to_display
6 h; }% |1 {; r h2 N; x% gUF_DISP_regenerate_display
0 W. m0 Z. B+ @8 RUF_DISP_refresh7 w) [, I$ |; X# f7 o
(4)和装配有关4 z4 U8 o4 c, o! } ]9 X# [+ e% H
UF_ASSEM_create_component_part* o' Q! k3 D* v4 M0 @+ D
UF_ASSEM_create_mc_array: l; Q# f9 s5 E
UF_ASSEM_ask_work_part- L/ [/ b# W+ M
UF_ASSEM_ask_component_data
( ?* R3 l3 Z7 G7 n UF_ASSEM_ask_mc_array_data
7 i! @% @) `$ } UF_ASSEM_ask_assem_options
9 l9 B' d( i+ K6 N* d2 d) W$ z UF_ASSEM_is_occurrence( e" O3 M; y5 _$ |( G) s6 n
UF_ASSEM_is_part_occurrence6 b" o9 X) Y/ n! E! i
UF_ASSEM_ask_prototype_of_occ8 r* `( W9 w/ l, P; I0 _
UF_ASSEM_ask_inst_of_part_occ
/ L q1 X! G4 _) I2 P UF_ASSEM_ask_parent_of_instance
/ S6 k4 F1 S+ |( |$ O( `; Q UF_ASSEM_ask_child_of_instance
& }: A8 k& O X, m% F UF_ASSEM_remove_instance
) N$ J* I4 g& c UF_ASSEM_ask_occs_of_entity% y- W# }- L" G2 O6 T/ E
UF_ASSEM_ask_occs_of_part
1 t+ o+ F f a UF_ASSEM_set_assem_options
0 m, X: F- b9 _9 s! k6 o# J UF_ASSEM_cycle_ents_in_part_occ' L q# u1 k4 D% |, u. P( ]
(5)和图层有关" `3 @& Z5 x* A- \8 O0 \% {
UF_LAYER_set_status7 X$ W2 a! x) }% U
UF_LAYER_ask_status& ?4 ?% b) [2 _. d- t) R/ c/ V
UF_LAYER_cycle_by_layer
2 y; ~8 t. z5 t# J (6)和对象相关$ m' d& f5 s& ?+ b
UF_OBJ_delete_object
5 d8 a# ?5 c/ t/ P: l5 A UF_OBJ_ask_status: X/ Q8 Z1 C8 Q0 X5 f, Q7 L
UF_OBJ_set_def_cre_color
6 O+ r" e8 _2 V UF_OBJ_set_cre_color
1 F/ M" ^# n7 p% P% ?4 O0 w3 t UF_OBJ_ask_type_and_subtype
7 Z" T9 E- g; A6 s (7)和表达式相关
1 O7 V. ^% e4 R2 O$ p' T0 _ UF_MODL_create_exp
7 S' X+ |4 `; g& y& f& P UF_MODL_ask_exp
" w% B' r9 I6 W# a2 g! q UF_MODL_edit_exp
3 P; y1 y/ F9 t- F U' @ UF_MODL_delete_exp! `; _ E& `% v& d: C3 K
UF_MODL_eval_exp
) K t. g) F1 b UF_MODL_export_exp
/ F; \; G6 y k# @3 j' Y* L UF_MODL_import_exp2 ~" r* _: t w' ^: P1 t% U
UF_MODL_rename_exp, ]5 b s* A! x2 U6 T
UF_MODL_create_exp_tag( c3 D# P c8 b( X$ e2 K9 y
UF_MODL_ask_exp_tag_value& ]5 i$ _% Z2 H9 M" M5 G; i" @7 @
UF_MODL_delete_exp_tag
( q: J0 {4 M0 U8 L& y' u UF_MODL_ask_exp_tag_string: J" I. R: q, c& y1 ?. z8 H
UF_MODL_dissect_exp_string4 d h! x$ K4 ]. i/ s; j
UF_MODL_update8 k$ Y/ \- y( u/ o2 i
(8)和模型链表相关
3 d1 l$ U) J _/ A) S5 q2 K UF_MODL_create_list
8 d7 ]) T0 W1 H2 T UF_MODL_put_list_item: N* i. i8 G3 [8 Q; A/ B
UF_MODL_ask_list_count& R% l+ M* f# B: \- Y. f, n- g/ {
UF_MODL_ask_list_item
* M, D* g: _3 \9 e UF_MODL_ask_list_item
) I0 W- O3 z2 M$ | UF_MODL_delete_list
* C- B6 W6 z( n: g, H UF_MODL_delete_list_item
2 t, C$ m# ?+ u% [! R(9)和创建模型相关! H6 b* M7 z* o" k
UF_MODL_create_block1
3 ~. H1 ?6 ^: q# q% G) {7 _# \ UF_MODL_create_blend
1 M% b& D( L& Q" O( m UF_MODL_create_cyl1/ O' [6 C1 ~8 j: d$ _' M5 Q
UF_MODL_create_hollow
5 V: \' l' x7 D" p* t; a2 E* s% x4 g UF_MODL_create_linear_iset5 w+ ]2 t! U6 O9 @+ C: u$ k
UF_MODL_create_rect_pocket
5 l( U3 }( C T* |) x: j UF_MODL_create_rect_slot
! ^1 ^% x+ \5 o" l UF_MODL_create_simple_hole
7 {7 W6 a& c {* Z8 o* x& k UF_MODL_operations8 u Y8 q* O4 N: V! S- K3 x) a
UF_MODL_active_part
' }% w" y# r+ A3 i6 X S3 W6 `(10)和模型查询相关
" M; R% G! T% u) j UF_MODL_ask_feat_body; {7 s! o& E' r
UF_MODL_ask_body_type
9 O5 D+ F/ r- h8 p& b* _/ y UF_MODL_ask_body_faces
- j$ `- k/ P, W# |' H0 F UF_MODL_ask_body_edges
$ Z1 M8 a; W; x1 O) |' I b UF_MODL_ask_edge_body# d' V' M- Y( W) l
UF_MODL_ask_edge_faces
+ e2 G0 s' {9 L+ k6 c UF_MODL_ask_edge_type$ s) u8 O1 w$ }3 Q; e* o
UF_MODL_ask_edge_verts3 o( B }6 M0 K: m) Y2 v+ A/ \
UF_MODL_ask_face_body4 _; m7 ]/ R w4 t N$ j0 l4 @4 u9 {
UF_MODL_ask_face_edges
1 Q3 v% T% E+ S UF_MODL_ask_face_data
! Y/ X8 J1 }9 _! f UF_MODL_ask_feat_faces0 \0 H, b7 G: ^3 X4 _8 `
UF_MODL_ask_block_parms; g" U2 M( E$ x2 |6 c8 [% H
UF_MODL_ask_minimum_dist1 I' b& P0 v/ _" J& b2 a
UF_MODL_ask_simple_hole_parms
& N; m! x# I( B) a8 M. x' a(11)和对象名称相关7 W0 ]1 a/ x; |
UF_OBJ_set_name+ M, x0 h& m3 m" R7 F. N5 R* _
UF_OBJ_ask_name6 `7 `0 d& S! V$ w: b0 F0 k! e
UF_OBJ_delete_name
- N5 L- E) J; [( L" r6 Y) K. Y% O UF_OBJ_cycle_by_name+ A2 ~5 [: l, y
(12)和制图尺寸相关
& j$ |* D2 Q6 M9 i& L/ c UF_DRF_ask_preferences- B. n+ q$ c1 B
UF_DRF_set_preferences
- ]/ ^: [& i( m2 p UF_DRF_create_horizontal_dim
9 A# B4 U0 Z, h! K UF_DRF_init_object_structure1 P6 [1 y6 L8 f) Q
UF_DRF_create_vertical_dim
" v, d' f1 j6 ~. ?7 } UF_DRF_create_note$ e0 `4 U; `* m8 t
UF_DRF_create_label
) a9 D1 a4 X* }- s UF_VIEW_ask_tag_of_view_name) k/ ]& n" a2 ]9 A( |
UF_VIEW_expand_view/ Z8 ]1 o% y# t8 Z# r4 D7 m, z8 w
UF_VIEW_is_expanded0 u7 _1 z9 Z$ Q8 S* b) {! F& E/ D
UF_VIEW_unexpand_work_view
% Y" l8 |9 j, ]4 N$ C(13)和视图相关
! T6 Y$ D3 w; C: R d$ l( V1 |& } uc6476 //Set Drawing State4 x) f8 k) [3 {# h+ _2 M
uc6477 //Retrieve Drawing State4 O8 v. L" d9 b
uc6478 //Create Drawing
. d4 X# f; b+ n! j" y1 a1 [2 e uc6479 //Read Drawing Size
7 _; F" m0 }. l) O4 y/ ~ uc6480 //Set Drawing Size3 D2 m. Z7 }! P: P1 k( z
UF_DRAW_ask_drawing_info! V1 l+ \+ ]5 e' o, h8 w) x
UF_DRAW_set_drawing_info8 v, ]/ G- l3 j" L1 y \- p6 r, |1 c! }
UF_DRAW_import_view
* b7 t7 \) @/ m& l. `( y uc6481 //Add View to Drawing
1 ~7 n' Y- x# x: e3 b; v: [/ X1 _) k9 ? uc6482 //Remove View from Drawing
6 f! R/ Y5 y: s& m5 P- _ uc6483 //Read View Reference Point on Drawing
; g4 b% N6 K" l" h* i uc6484 //Set View Reference Point on Drawing
$ k- w; T- w- Z" |3 E uc6485 //Read View Borders on Current Drawing5 M1 P9 i" R) \2 C+ D
uc6486 //Set View Borders on Current Drawing) J( S7 Y4 V" h' j( T2 z4 e! T
UF_DRAW_define_view_manual_rec t
* f3 i9 ?" }% m3 F UF_DRAW_update_one_view+ B2 y/ D6 d& T7 O
uc6492 //Read Current Drawing Name& J' Q$ y$ P2 ]
UF_DRAW_ask_current_drawing
' P) r7 Q# F9 i5 S9 ~ uc6496 //Rename Drawing
! z2 Q1 a% m2 @: g* ?- z( c+ r uc6495 //Delete Drawing4 F7 [2 l; J& ^6 Q) I- A4 S8 x- `
uc6499 //Cycle Views in Drawing2 f4 l# Q5 I$ d9 m; X2 l
(14)和属性相关) x/ P$ Q0 ?2 u. z' E
UF_ATTR_ask_part_attribute7 j+ \3 w9 I% T# N5 e: g
UF_ATTR_assign5 E) X* P2 _: B8 g6 |3 O
UF_ATTR_ask_part_attrs# w1 b& q" U2 H* n0 x- g* p
UF_ATTR_ask_part_attrs_in_fi le
$ h& D' ?# T8 Q# q" |5 v" H UF_ATTR_read_value2 E( k, N- f; I9 y' Z0 Y
UF_ATTR_cycle( `# R/ J) }0 s; f/ y/ Z" f
UF_ATTR_delete+ G1 A E: `& |! b% j- W- g
UF_ATTR_delete_all4 V9 f. d2 z/ _3 m4 {
4 C6 F# u5 W9 K8 J
% G' G s0 l& ]6 |$ k/ F, r
|
|