|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发中常用的ufun API函数大集合,熟悉这些就够了
4 a b2 U) z) A0 e# L
3 \6 _" g5 W8 s8 g: S8 ^' X" V/ n这些函数是经常使用的,可以作为参考!) a0 g- A5 z P( B- N& w
6 L3 F' S1 Q+ e, a7 V3 Q
(1)和Part有关
+ S: }0 K; g# J6 i* Z UF_PART_open
+ Z& l3 {: S4 Z2 K, h, U UF_PART_close_all8 e( w+ p! `$ ]+ ~
UF_PART_save_all7 S1 x$ V$ G8 f6 }% h
UF_PART_ask_part_name$ A4 W0 `; T3 B6 ^4 u4 e
UF_PART_ask_part_tag
" M+ m5 b8 d0 c n3 N) \ UF_PART_ask_units0 l3 I# V. z$ `( s( H
UF_PART_ask_display_part
k- o0 n- A d- b2 B UF_PART_set_display_part
9 [: W# w& h/ H8 l# q& t& V UF_PART_is_modified, v+ g% K3 L0 A) H
3 Y" L+ H- f Y" l( R! |: u$ Y
(2)和菜单有关
; u6 w# I6 w" |( d9 ]9 F% R, Kuc1601 — Display a Simple Message on the Cue line: `/ G7 R& G) j
UF_UI_set_status. w4 R+ j- W5 u
UF_UI_set_prompt
) o; h4 \3 }7 g1 U/ H- q! Vuc1603— Display Selection Menu/ Z9 p% ~( H$ Q$ D3 A# D* c' u
uc1605— Multiple Selection Menu0 k& E: M6 N1 V9 y: d: m
(3)和选择显示有关6 x$ Q2 V! n5 U" v3 }; ]2 h$ a
UF_UI_set_select_mask! ]' ^ t0 g1 m8 x: a) R4 `
UF_UI_select_with_class_dialog% ^$ v3 N# L0 b- l' B: j/ c
UF_UI_select_with_single_dialog8 n; e" Y( @' m$ O
UF_UI_set_sel_mask6 ?4 n6 B* l n" J! s, @
UF_DISP_set_highlight. ]9 _! C+ w9 v
UF_DISP_set_display
3 }+ y3 u+ v% v8 V, nUF_DISP_add_item_to_display
# Y0 D: e+ f) p! w& t& @3 c+ yUF_DISP_regenerate_display
0 W" E) W- _/ O w( `$ F2 q4 ~! _UF_DISP_refresh
0 g, ^. S- y# E9 C(4)和装配有关
& o3 [3 h9 n/ o UF_ASSEM_create_component_part
! F& E/ _, _6 m" |( g UF_ASSEM_create_mc_array
5 p% N0 m- D9 E8 w" q2 b: k UF_ASSEM_ask_work_part6 N+ i7 t5 V1 k% ~* g
UF_ASSEM_ask_component_data
+ }5 t$ [0 c5 g5 ? UF_ASSEM_ask_mc_array_data
2 w8 e, l# }8 x/ r UF_ASSEM_ask_assem_options# o5 l0 O/ G: J3 q: h2 C; v2 c% ?) F: w
UF_ASSEM_is_occurrence9 g4 |9 k4 j4 N! x2 y9 `- |9 z( r
UF_ASSEM_is_part_occurrence. u0 j+ s1 r" V+ c5 D
UF_ASSEM_ask_prototype_of_occ& s# S+ s" i j
UF_ASSEM_ask_inst_of_part_occ
$ f5 P) o2 @/ d8 k) A6 [ UF_ASSEM_ask_parent_of_instance
! x; F4 m/ ~. p3 J: S4 y. p UF_ASSEM_ask_child_of_instance# q1 D! O/ A+ ^0 A- m8 j, S5 W
UF_ASSEM_remove_instance
/ M! ?$ ?! |) r. J3 o UF_ASSEM_ask_occs_of_entity* A3 ]& q4 w( X6 b" j8 A0 @
UF_ASSEM_ask_occs_of_part! u6 E6 D+ P/ Z: m8 V+ }, L/ c- F
UF_ASSEM_set_assem_options2 I. b t3 d) P$ B" w
UF_ASSEM_cycle_ents_in_part_occ
( Q4 W, a5 M. b" L P m, x(5)和图层有关' e# [& C+ b7 t; @' n' s
UF_LAYER_set_status
+ j' |( M) K% p0 a) w UF_LAYER_ask_status
: ^2 h5 H1 U$ B' r, M8 A# l UF_LAYER_cycle_by_layer2 L8 {! g6 d1 ?/ t
(6)和对象相关
+ w6 x$ A& X5 n/ Z UF_OBJ_delete_object
& x* l4 R$ E! s1 ?, A) S3 ? UF_OBJ_ask_status
# n7 C$ E b7 q5 C' [. p" N' Z' D UF_OBJ_set_def_cre_color5 j8 j; R9 o4 K4 o0 T" J! B
UF_OBJ_set_cre_color
: \) D0 f( l0 i% O, @ UF_OBJ_ask_type_and_subtype
/ _3 r: l# s# ~/ L (7)和表达式相关# Y3 O1 ~ ~) a" f
UF_MODL_create_exp/ M6 G. J5 ~- T
UF_MODL_ask_exp" C; B7 L6 u8 B) N
UF_MODL_edit_exp
( }. D8 m# n) x' r) ]- Q( ] UF_MODL_delete_exp
7 @- d" c0 V2 ~ UF_MODL_eval_exp
5 B X0 \9 w) z% ] UF_MODL_export_exp0 J) r4 o7 b9 F5 e1 \3 e2 ~( w
UF_MODL_import_exp9 V3 V1 u) |; Y1 m4 L7 m1 i
UF_MODL_rename_exp
, n" J3 ?" t3 C: A! H4 W' |1 e0 G U UF_MODL_create_exp_tag# P* g) \" a# n
UF_MODL_ask_exp_tag_value2 V2 a0 W+ ^: t: G2 @' e; \
UF_MODL_delete_exp_tag
S0 R* U; R9 p; d/ h. n UF_MODL_ask_exp_tag_string
3 t9 G3 ]& C' h( Y* E5 p, s0 ~. M9 k UF_MODL_dissect_exp_string
' W1 s( \, Q& L j" J: G) y0 X% I UF_MODL_update+ } O8 ]9 V+ ~/ w, c0 I' Z3 S; L, r
(8)和模型链表相关
: c8 z+ _0 [+ |+ c# s UF_MODL_create_list/ V$ A3 I- N. ?
UF_MODL_put_list_item
; Y' i. X5 I, z- m8 Q9 W% B; H2 _8 ~- e, @ UF_MODL_ask_list_count
; V/ | P1 e# g+ ` UF_MODL_ask_list_item
+ \3 j: M, M: q$ @7 ^3 b* l UF_MODL_ask_list_item
) a( r' u9 I- `( W! f( A9 z8 l* ` UF_MODL_delete_list1 c* J) T5 a! Z5 U- x" A
UF_MODL_delete_list_item
3 S) f/ i+ g8 N( c) ~- F(9)和创建模型相关7 b) f: `6 J: X: p& L! ^
UF_MODL_create_block1
. w( v4 O. `$ b& d! { UF_MODL_create_blend
5 w* U; n! G1 \; J) Y" o$ Z UF_MODL_create_cyl1
2 T1 t. B$ n- l9 o- a6 H: j4 M$ Y UF_MODL_create_hollow
7 W' T: M! E% b1 ]* a1 D UF_MODL_create_linear_iset1 X! G% y# d8 g
UF_MODL_create_rect_pocket
! B2 Z# ?6 Z' f# V" z( O9 } UF_MODL_create_rect_slot0 |. U# W1 j7 u/ o* U
UF_MODL_create_simple_hole: [( n* g* J, e5 I. I
UF_MODL_operations( p( f8 V& d/ |. ~* \6 {
UF_MODL_active_part
% w j8 p/ W8 C- M! B. s7 J2 }' e(10)和模型查询相关+ R- T# _$ t3 ]& z. u! r
UF_MODL_ask_feat_body
/ U) J, ?: j1 q, I: ] UF_MODL_ask_body_type5 O6 u; ~3 s7 b8 L Q+ r$ s$ q* m
UF_MODL_ask_body_faces$ r9 i1 D+ v3 G$ e+ R5 F# y
UF_MODL_ask_body_edges
( H# u$ ~) j% e6 o) k UF_MODL_ask_edge_body- a6 i. n0 D! M% ?" Y5 v
UF_MODL_ask_edge_faces+ p& P- M+ g* V( l
UF_MODL_ask_edge_type
: E! a1 @6 X, w4 W, R( J7 [3 C UF_MODL_ask_edge_verts$ j3 }5 x q: u. b4 Z# i
UF_MODL_ask_face_body4 U0 m7 T7 Q$ \. `) E5 t3 o
UF_MODL_ask_face_edges
" j& V- ]; {2 V* o8 h UF_MODL_ask_face_data5 |- n6 x% j6 L) c/ Z
UF_MODL_ask_feat_faces! ]$ q. b# A7 V0 @1 N5 w0 M' N
UF_MODL_ask_block_parms
0 c- E7 x- [! s UF_MODL_ask_minimum_dist
9 @; `& N. H4 n( N' B4 p9 ` UF_MODL_ask_simple_hole_parms
6 |) x' q/ }& h* L6 i6 \(11)和对象名称相关
5 c/ J% S5 e3 M/ Q UF_OBJ_set_name, D$ H+ ]* A+ }# j, _' c, t
UF_OBJ_ask_name
, i& A6 [+ j( h UF_OBJ_delete_name
0 {9 l* w) k: R9 f2 S$ X3 k) |' ^ UF_OBJ_cycle_by_name3 \( J: B; Z& J! x
(12)和制图尺寸相关
( h/ F( M$ v, X- K- z- Q3 `% C UF_DRF_ask_preferences
% n. o' g/ a5 g7 e UF_DRF_set_preferences
$ I* |8 }0 f- `9 v: G9 I UF_DRF_create_horizontal_dim: U$ C, x8 D+ o! ]2 W1 H
UF_DRF_init_object_structure
: ?# K& Y2 L) d9 l, F) r ` UF_DRF_create_vertical_dim0 X! s& F `4 f2 ]. \3 {$ x0 T/ ?4 _
UF_DRF_create_note7 g0 o" o* s3 \/ g
UF_DRF_create_label* `7 e3 w% q3 ]. Q; M
UF_VIEW_ask_tag_of_view_name; E- R. m$ s& B: E' [, [, I
UF_VIEW_expand_view( H' `1 g" n+ U$ I+ N4 J. C9 R
UF_VIEW_is_expanded
0 X0 d" r' ~2 l* k9 i2 c4 @3 J, r UF_VIEW_unexpand_work_view
' `3 Q: {; e4 Z4 P7 H d(13)和视图相关9 V2 I% y, E8 G
uc6476 //Set Drawing State
) |* }2 o( o5 ~2 z7 z7 V uc6477 //Retrieve Drawing State3 I* Q/ @, g$ _- w8 ]; p3 K V
uc6478 //Create Drawing
0 i) L: N+ z n5 R2 E uc6479 //Read Drawing Size* z" @5 Z# A9 X% {
uc6480 //Set Drawing Size
: F$ B1 U6 U7 Z4 T UF_DRAW_ask_drawing_info
: c+ ~% t% J9 Y, s n7 D UF_DRAW_set_drawing_info
7 l3 P, G6 i4 R0 z. g0 L UF_DRAW_import_view
0 Z M/ ]! K: H uc6481 //Add View to Drawing# N& U5 q. w9 N u, {+ J
uc6482 //Remove View from Drawing1 F9 x, L+ d V$ p
uc6483 //Read View Reference Point on Drawing9 f) B/ j1 K6 u: c3 F% `/ g7 _& \
uc6484 //Set View Reference Point on Drawing
7 e9 U" G6 M; H3 A+ c2 U0 d7 D uc6485 //Read View Borders on Current Drawing
5 \; L' e) b) r$ y R; n+ ^7 l uc6486 //Set View Borders on Current Drawing
, _! f, }0 }/ h3 N6 s UF_DRAW_define_view_manual_rec t# H- R* S- t: o( {/ k
UF_DRAW_update_one_view
4 z% d/ s5 H1 K& ?- C uc6492 //Read Current Drawing Name. e j, x4 O Y8 Y" @
UF_DRAW_ask_current_drawing, q% p K) ~2 G8 o e3 t
uc6496 //Rename Drawing
. D5 ]& K; K* Y% j) M uc6495 //Delete Drawing
3 b3 {5 e6 B/ L: w uc6499 //Cycle Views in Drawing5 s L w" c0 u
(14)和属性相关2 J! N" u6 M8 ~2 H2 U9 g
UF_ATTR_ask_part_attribute
9 ~# r8 }3 v3 ~8 c UF_ATTR_assign6 @ y- B3 p$ R
UF_ATTR_ask_part_attrs+ \8 v5 ]( _8 A" b/ X6 _( j2 q
UF_ATTR_ask_part_attrs_in_fi le
1 ? R$ O5 S) ] UF_ATTR_read_value
: H. ]) ?. C2 }- |3 S$ t UF_ATTR_cycle
" y6 O4 x) w% I, A( P7 a- w4 M UF_ATTR_delete. i5 z- j" f' v* y; e. ]9 a/ }- \6 {$ q
UF_ATTR_delete_all6 F0 d& a6 s' r) J& }
6 ~0 g" y$ U, d* E6 j! A' P8 p/ z/ T) e% X9 ~1 {9 Z
|
|