|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发中常用的ufun API函数大集合,熟悉这些就够了: a6 _& Y9 c7 y j
V8 f. {. ~! W3 @! W; u. {这些函数是经常使用的,可以作为参考!& o. X/ o0 N8 `9 u: l" Y
0 a( M! v7 `& I: ^: l" E7 z(1)和Part有关( `7 o; @3 g) {$ w( g0 }0 K
UF_PART_open
- b8 Z- |4 R$ b' Q UF_PART_close_all
* j! M' J6 Q5 Q' o( p; W5 h* B UF_PART_save_all
# R+ E' A2 y! s% L. h; L5 O UF_PART_ask_part_name: s. q9 q G9 Y/ @7 S
UF_PART_ask_part_tag; ^( w6 q* @) `/ ?9 A
UF_PART_ask_units! ~$ M8 \6 y2 q! n8 i7 Z
UF_PART_ask_display_part6 F2 ]4 J# J% l5 M1 b, `
UF_PART_set_display_part2 B& K6 p. P3 B/ ?
UF_PART_is_modified
( ^& `% o& ~( d, n
3 e( \4 t; a' P0 V3 S3 @(2)和菜单有关$ I* ]; H" n; J; D; I" l
uc1601 — Display a Simple Message on the Cue line
6 i: J" t9 M# ?8 l6 @0 M) n rUF_UI_set_status
! w* T' E0 c2 a0 |6 nUF_UI_set_prompt
3 ?3 p* l. w7 Yuc1603— Display Selection Menu
4 D* }" l- r. D) Z% m; z) \# P+ muc1605— Multiple Selection Menu
- o! H. K6 V, c) k(3)和选择显示有关 c2 E2 m% n1 p
UF_UI_set_select_mask
9 e: V7 l' c2 I* z( _UF_UI_select_with_class_dialog) d, s8 _7 ]9 k& x U$ P
UF_UI_select_with_single_dialog- b6 B7 B2 c% p: Y- ]1 i
UF_UI_set_sel_mask/ a2 e( F9 G: {/ m
UF_DISP_set_highlight( h# e% Z& j3 i
UF_DISP_set_display: [: k3 N6 b8 I% _
UF_DISP_add_item_to_display
: F/ w* Z1 e1 p$ @- z9 {UF_DISP_regenerate_display
; d- k) g, O# y0 ?' [. A. @UF_DISP_refresh
& q9 L, f" P6 J1 N$ d) U% s2 H(4)和装配有关
, r1 z% t: B' @$ m( e UF_ASSEM_create_component_part5 i3 l$ Z |* ]. \5 _ I8 `8 ]+ H
UF_ASSEM_create_mc_array' m7 j& Q x3 @5 o' M3 g# F7 [
UF_ASSEM_ask_work_part" g. {# K) w& @
UF_ASSEM_ask_component_data7 M. g8 i% v- D
UF_ASSEM_ask_mc_array_data
1 G/ o9 b- z7 M: G1 O# G' Q+ n6 _ UF_ASSEM_ask_assem_options
; Z; N* f- M( e* q UF_ASSEM_is_occurrence
- ^% A0 O7 a# ?& g2 }) A UF_ASSEM_is_part_occurrence( v( L8 W" b3 u, j
UF_ASSEM_ask_prototype_of_occ
, I5 I' p- \7 ? t( t UF_ASSEM_ask_inst_of_part_occ7 g3 l0 O8 \% R6 D
UF_ASSEM_ask_parent_of_instance
+ r" m. D e8 S( S7 F. r) e5 Y UF_ASSEM_ask_child_of_instance
$ o4 P; V( {7 g0 S( _6 ^# K- B UF_ASSEM_remove_instance
$ t" X: ]/ ]% S4 s. I UF_ASSEM_ask_occs_of_entity' a; b5 e( S" N! R2 k* u/ D( `
UF_ASSEM_ask_occs_of_part
7 x5 C" n: z# {' T1 Y/ Y5 Q UF_ASSEM_set_assem_options7 G1 ^0 I( W4 w: L: \
UF_ASSEM_cycle_ents_in_part_occ) T0 J2 N: N: h3 {
(5)和图层有关
" T3 B" a2 }; g' n5 M% Q3 G" T UF_LAYER_set_status+ l G2 N8 @! t% @# X' B
UF_LAYER_ask_status8 Z3 x6 A" H; \ z5 W
UF_LAYER_cycle_by_layer
6 _4 ~7 N/ U( v3 U3 ]; l- | (6)和对象相关# h9 |4 s+ w* I* U. \6 S
UF_OBJ_delete_object
7 E' [1 S2 T6 G" o9 s UF_OBJ_ask_status9 a% }+ A+ g, F: f
UF_OBJ_set_def_cre_color
. O5 N) C ]( v5 A UF_OBJ_set_cre_color
; \# A! y. a4 @, {# ^9 V UF_OBJ_ask_type_and_subtype" L5 h! c1 Y3 B/ n$ ?: ?4 S) b4 J! y
(7)和表达式相关
6 z. M. B5 O4 B; U- D8 V' G7 S UF_MODL_create_exp
- x3 T( C& T% T UF_MODL_ask_exp
# M* Z/ C& f2 T' I. p; ?) u5 G UF_MODL_edit_exp
: p. Z% V, k$ r1 q$ w1 @ UF_MODL_delete_exp4 @5 R" _0 t% o0 X& S7 f& b+ h
UF_MODL_eval_exp
5 R5 u/ _& t' l# A. t" l6 F( Z! n UF_MODL_export_exp' o; b) A/ j$ K- t" v
UF_MODL_import_exp& j9 L6 Q: A+ a* h7 Z1 |
UF_MODL_rename_exp
( s8 y' V5 d* {+ k UF_MODL_create_exp_tag
, o8 y" x: Z( p9 y9 j2 p7 t( I0 a UF_MODL_ask_exp_tag_value6 z/ S' C' h9 l" E6 R& L( _5 J9 Z
UF_MODL_delete_exp_tag$ x1 O+ l1 m7 F$ {( D& n
UF_MODL_ask_exp_tag_string ]1 m# N+ F7 p" N2 _1 o/ ~6 m* u4 B
UF_MODL_dissect_exp_string& K8 Y" o7 z1 U6 N: M2 [* f* n4 B/ Y
UF_MODL_update. ^3 n% P: {8 n* J
(8)和模型链表相关( ~+ H, I& p2 b0 m8 n; `9 V- N" J
UF_MODL_create_list
8 k% v' m5 d' T3 J( V. D& k UF_MODL_put_list_item
+ z8 x, m5 @! |4 x UF_MODL_ask_list_count
/ d }1 J& \) O5 X4 a UF_MODL_ask_list_item. J- K+ l% { ~+ L
UF_MODL_ask_list_item
9 l1 W' Z7 w; k" [0 i/ Q- H/ u UF_MODL_delete_list
9 u& H6 Z4 R( h' P0 s UF_MODL_delete_list_item
% V, R" z. e5 r% z/ ?* u! m& U(9)和创建模型相关$ X4 x( ^, Z7 \
UF_MODL_create_block1
, d0 {- |& ?# z9 A7 i# o6 l UF_MODL_create_blend
4 a+ a4 }7 ]( k" t. z& v UF_MODL_create_cyl1
& u* W% }: F) T UF_MODL_create_hollow
- \" t8 @3 O5 z! D' w) z5 F0 | UF_MODL_create_linear_iset
# |) `- I" X4 L, Z* R ] UF_MODL_create_rect_pocket
& L/ G o" N2 m9 k7 j7 Z2 U1 ` UF_MODL_create_rect_slot
; P; ?0 c1 G% e UF_MODL_create_simple_hole
& e: G& Y1 M$ Z8 n UF_MODL_operations* w& v: f- n1 `* k- m4 ^6 x) x+ { p, i/ Q
UF_MODL_active_part. N* Y! G% U2 v9 k; J
(10)和模型查询相关
$ W' _8 I- F' T' ] UF_MODL_ask_feat_body
8 f4 n. S7 ?' o UF_MODL_ask_body_type
( W, j9 f. f& D7 F* y UF_MODL_ask_body_faces7 o) w' P* i- p) j' P
UF_MODL_ask_body_edges
3 @6 ^( v" U' g/ J UF_MODL_ask_edge_body
. W! K4 s' e) [! E& A: m UF_MODL_ask_edge_faces3 Q3 D9 k. o, t& L9 S% b
UF_MODL_ask_edge_type
3 L9 J- V, R- T% z UF_MODL_ask_edge_verts+ A2 l ^% | `; Y% x- r! ^( d
UF_MODL_ask_face_body
/ F- p0 y$ n, [# ~0 W0 C UF_MODL_ask_face_edges/ o! Z. M: x; W+ O! }0 H
UF_MODL_ask_face_data2 R- z; I0 X( H3 C) k
UF_MODL_ask_feat_faces
, J' N. I" F) v8 H. k UF_MODL_ask_block_parms- P0 {- d m9 t# z3 ]; F; v
UF_MODL_ask_minimum_dist/ q! u" t( L4 A, C7 p, c9 j' q( f# P
UF_MODL_ask_simple_hole_parms0 |& d: k2 b/ O- Z% M2 q3 M8 M
(11)和对象名称相关4 d: _0 F$ t2 o" S! d$ Y
UF_OBJ_set_name
: C* y3 r2 K* N& h* T/ J! }5 l UF_OBJ_ask_name( G8 c3 o* N- e$ r+ B# A
UF_OBJ_delete_name# ]9 A8 B9 N. O
UF_OBJ_cycle_by_name1 C3 e0 P6 b4 Y" s! o3 Q: g
(12)和制图尺寸相关
$ L' @8 L% U! \0 K# U UF_DRF_ask_preferences
; l: C1 i/ \ k! Y9 s UF_DRF_set_preferences0 t% R0 s3 m/ O- ?, O7 @
UF_DRF_create_horizontal_dim
& H4 W" v6 \+ P4 h- K UF_DRF_init_object_structure: u' t2 o1 N$ u
UF_DRF_create_vertical_dim4 G9 E0 l' S3 i
UF_DRF_create_note
& c" c& ?6 K% j F1 R7 `9 f UF_DRF_create_label
+ M0 X6 ~! M9 x9 q& I UF_VIEW_ask_tag_of_view_name: ~ b& a" K' C5 k
UF_VIEW_expand_view4 E- R& b9 X5 n: I
UF_VIEW_is_expanded8 e0 e9 E, P9 W7 `
UF_VIEW_unexpand_work_view4 a1 @& J& ]% F* t! H4 h' C
(13)和视图相关
! J6 x: m" ^! O uc6476 //Set Drawing State! U# C$ m b' @- u2 [) c
uc6477 //Retrieve Drawing State$ a- ?/ ]% _' |9 E4 |
uc6478 //Create Drawing. X! @5 D# {, }+ L( [2 R: [$ j
uc6479 //Read Drawing Size
/ t; x, w, e7 | uc6480 //Set Drawing Size
' }+ C. w" ~6 C! h: Y' l0 m+ y( _/ | UF_DRAW_ask_drawing_info% g1 M7 B0 g' b3 J1 g* y% ~: e( s
UF_DRAW_set_drawing_info6 x2 |& _- W# f4 |) X
UF_DRAW_import_view. ]. h3 v1 L# C6 k
uc6481 //Add View to Drawing
" Z; ?5 y2 j! A# R) r$ E$ B uc6482 //Remove View from Drawing
- u1 B% ^6 g0 d uc6483 //Read View Reference Point on Drawing! ^6 p6 r2 {5 [
uc6484 //Set View Reference Point on Drawing2 e5 }4 A! y5 x1 U' h" h% Z
uc6485 //Read View Borders on Current Drawing
N; f0 J( W) A uc6486 //Set View Borders on Current Drawing
4 c) V/ u, X6 i9 M: \% O+ x UF_DRAW_define_view_manual_rec t
5 [+ z6 u! c4 ~8 X UF_DRAW_update_one_view
: `; y$ Z/ w4 @* u uc6492 //Read Current Drawing Name
2 U4 ~' i4 _0 u, B5 A UF_DRAW_ask_current_drawing$ y5 @& C2 d5 f; y. F- j
uc6496 //Rename Drawing
/ K& Q- s; t" p6 U uc6495 //Delete Drawing0 c' b, `$ S {1 M2 c. P! s. e
uc6499 //Cycle Views in Drawing
( R m6 c8 A$ j% e- o8 v(14)和属性相关
7 A7 [) H3 V9 B# X0 i9 r UF_ATTR_ask_part_attribute
, p- `9 y- f5 }2 g0 ]$ E UF_ATTR_assign
! R* Q, S- ~! I* ` M1 X. | UF_ATTR_ask_part_attrs
7 n, f& [ \- U; u. v7 b0 e UF_ATTR_ask_part_attrs_in_fi le
- Z* x9 q! g* i# ~5 V& a4 m UF_ATTR_read_value( O, v- T% ?0 s) _% p/ Z0 Z+ s
UF_ATTR_cycle
- ~3 ?! ]2 U B7 r$ m UF_ATTR_delete8 c/ U3 W3 t8 h4 [
UF_ATTR_delete_all- Q& c8 U: N- r3 k+ E
) F$ n* q1 r/ ?! O2 k0 ? s& |3 l' \: }3 r+ C
|
|