|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发中常用的ufun API函数大集合,熟悉这些就够了0 J/ G* `4 h6 k* |5 {
8 `9 d# \+ P9 o. A( t. i, l' E这些函数是经常使用的,可以作为参考!3 @9 s) i8 F2 d5 V* c& k
' c; |" w" t/ ]7 \0 y/ N5 L! Z
(1)和Part有关& ^0 u* F) y( ~# T9 G
UF_PART_open
% G3 R) k) l% S3 p3 J4 _7 L UF_PART_close_all
8 f0 U+ b8 X6 d) H UF_PART_save_all
7 C, Y( `/ C2 i UF_PART_ask_part_name
5 R f. A& i! T1 ` UF_PART_ask_part_tag
7 p. L9 w0 v8 N- c UF_PART_ask_units% m4 {# ?9 B9 e9 J8 _) g |
UF_PART_ask_display_part$ M8 s- z+ j. N: b6 t
UF_PART_set_display_part
% @& U" N/ F' ~6 j, ?5 k8 p UF_PART_is_modified+ k- j5 H0 m y5 b
1 @ F) e* R1 R7 ^5 ^8 A(2)和菜单有关
# M, B* h. L Huc1601 — Display a Simple Message on the Cue line+ s. m8 `6 F6 I$ D7 f
UF_UI_set_status
6 X6 V8 b; R- V3 t( G1 mUF_UI_set_prompt
8 b0 f$ Q( a7 `- l( S4 nuc1603— Display Selection Menu- p1 }% ^- C0 J: C; M
uc1605— Multiple Selection Menu; ~. F* Z* Z5 S; {
(3)和选择显示有关! w# h8 r: W6 ^ c# |$ ~2 W% C
UF_UI_set_select_mask' F1 L- Q1 \* G2 X5 W
UF_UI_select_with_class_dialog
/ g( `1 }4 F3 k: O* AUF_UI_select_with_single_dialog
9 P& f! y! T: y" hUF_UI_set_sel_mask! z* X; p8 K) ~
UF_DISP_set_highlight7 ]! u$ a {8 F" o8 |
UF_DISP_set_display
/ i2 N6 Q& f2 ~$ f% E1 v$ TUF_DISP_add_item_to_display
& a2 q+ a+ h j& o7 Z) i7 {8 f5 ?UF_DISP_regenerate_display
) e* e- u! j/ E1 Q V2 _1 m* r& o1 ]( FUF_DISP_refresh
+ n5 |! p' a- E2 e# W(4)和装配有关9 S5 R, p3 B) i/ a+ ^( G' Y# x; u
UF_ASSEM_create_component_part9 q( |3 m$ j+ ~! F- q- G l
UF_ASSEM_create_mc_array
5 I/ }; R4 h' [+ |* y4 f. p UF_ASSEM_ask_work_part& S l7 e% K2 l( D) [
UF_ASSEM_ask_component_data
8 S% z7 s7 ?' K# }5 E' G- Q* o" U+ q UF_ASSEM_ask_mc_array_data
! l9 L" X! d8 h5 T UF_ASSEM_ask_assem_options8 w5 }' Q. l* {4 D3 \
UF_ASSEM_is_occurrence" c# m6 j5 A8 f
UF_ASSEM_is_part_occurrence) c! W6 F8 M2 y2 @
UF_ASSEM_ask_prototype_of_occ Q( n- F9 g+ d8 K- z, f
UF_ASSEM_ask_inst_of_part_occ4 k3 }- J5 z. H [' c
UF_ASSEM_ask_parent_of_instance
, o! J" }- e5 O9 @) c UF_ASSEM_ask_child_of_instance
/ T2 F& m0 L2 `8 i1 O" C" S UF_ASSEM_remove_instance
0 g; i* I5 V- ]/ q0 r1 C* N% e: l UF_ASSEM_ask_occs_of_entity
0 @% D6 F/ ^, C& ^ UF_ASSEM_ask_occs_of_part+ B% d& }3 k: n( s& `
UF_ASSEM_set_assem_options
. k0 _7 ]3 D0 y- z/ e' E! G UF_ASSEM_cycle_ents_in_part_occ
3 n" \/ s Z" h, d) q% q(5)和图层有关; L; i Y. u" x/ u2 i& _* g, o0 K
UF_LAYER_set_status
0 b# @5 U' J( u( u% `3 T% j2 \ UF_LAYER_ask_status9 ?: b2 z; p7 N' a; K! k* h
UF_LAYER_cycle_by_layer
# @! C& u$ f6 U) k# W! Z; R (6)和对象相关! c8 Y2 H/ ? K; E% X
UF_OBJ_delete_object3 q8 Z2 @: i8 V$ I) A3 a
UF_OBJ_ask_status$ w" P9 }% M1 w2 E& e
UF_OBJ_set_def_cre_color4 I9 O. p4 s% E5 |: k6 X
UF_OBJ_set_cre_color
3 n2 d; q2 J& u+ w# }- T UF_OBJ_ask_type_and_subtype
- d, ]9 ]: F! g! L' F3 Z (7)和表达式相关
% ~+ t% n, s3 c; ^+ ` UF_MODL_create_exp3 Q) F' o$ k% G4 v( F
UF_MODL_ask_exp6 B' m/ H! t: i& P* R
UF_MODL_edit_exp
* r9 X8 q' i$ J8 x UF_MODL_delete_exp" B5 ?0 L V+ l' Y- e1 k6 Q4 k6 `
UF_MODL_eval_exp
1 P- s$ J f% w# n% ?7 n UF_MODL_export_exp
; ]6 d' ~+ a+ B0 i0 H UF_MODL_import_exp
! U0 @ p6 k7 A `$ W) V0 I UF_MODL_rename_exp* A$ s' |, \$ k+ C$ i
UF_MODL_create_exp_tag! K' r, {2 S; Y7 R& k
UF_MODL_ask_exp_tag_value: k' R; h; A5 q2 {
UF_MODL_delete_exp_tag: k {6 ^5 U4 t3 |) j. w& z
UF_MODL_ask_exp_tag_string* ?! y) J) m0 _( N
UF_MODL_dissect_exp_string0 g8 g6 U, H+ o& ~' W" C& p
UF_MODL_update
( Z% r" ^3 e" v4 q! _ (8)和模型链表相关
0 P$ v0 [7 X2 ^- o2 x5 M UF_MODL_create_list) q% F& Z# c" T, ]8 z
UF_MODL_put_list_item
+ h1 ?6 Z: E& v0 }9 e UF_MODL_ask_list_count
4 e9 [; ]. x1 `* q, W8 g. h UF_MODL_ask_list_item
2 B- W/ q! g( f$ o; n& s* y D UF_MODL_ask_list_item. [. Z& H, m5 l
UF_MODL_delete_list/ p# {( N/ v4 V5 v! T% L! M- H
UF_MODL_delete_list_item6 `$ w& A3 H7 D! ^. z1 A$ D$ h
(9)和创建模型相关4 Z# B+ d) x. @1 _4 t" w' f+ y
UF_MODL_create_block1
, K: }0 y! x; D/ W% F2 J2 h UF_MODL_create_blend
$ k; i: K& L ^; [3 `2 h UF_MODL_create_cyl18 w7 K% G" k% C1 e- \7 J
UF_MODL_create_hollow9 ?3 H$ ~' O0 Q9 I, l
UF_MODL_create_linear_iset
, V k5 `6 m! ]8 s- z9 A UF_MODL_create_rect_pocket3 \" g# K9 k9 U# ^4 G
UF_MODL_create_rect_slot9 n+ {5 |- |% z/ {* ^3 L
UF_MODL_create_simple_hole2 y' v7 e1 [/ I2 Q. C
UF_MODL_operations$ ]# W8 ~% X/ |- z8 a
UF_MODL_active_part) c6 U+ J! B& w9 C( d) v' _
(10)和模型查询相关. J( {9 W0 ?6 v Q/ l6 F; R
UF_MODL_ask_feat_body
6 b6 }; x9 d- q UF_MODL_ask_body_type
1 d) A' ?7 A6 x, j; Z7 c% l1 j UF_MODL_ask_body_faces$ Q" u$ D6 J6 P# K5 i, e3 U
UF_MODL_ask_body_edges1 J4 O2 Q: G) m- }! i
UF_MODL_ask_edge_body) g8 S0 Z1 V5 {1 v4 {
UF_MODL_ask_edge_faces
8 ^7 l' b- B/ g& I$ U UF_MODL_ask_edge_type
& \, X$ j+ p# D8 P UF_MODL_ask_edge_verts
4 i' R8 V& e$ I# D UF_MODL_ask_face_body
3 z1 P" E1 N# n/ b$ M7 Y5 m UF_MODL_ask_face_edges
9 z& n3 T9 c t- C* H# t* ^7 v UF_MODL_ask_face_data
3 x8 Y# R. c$ K* J" O o, {) o UF_MODL_ask_feat_faces3 {4 u0 [7 l& B; l( s% a s
UF_MODL_ask_block_parms
( r! a+ X1 I$ [7 v UF_MODL_ask_minimum_dist
6 }9 D6 r7 D2 j4 R, e6 D2 f UF_MODL_ask_simple_hole_parms
0 R U3 @- L* c2 M(11)和对象名称相关3 L3 u2 [3 s0 u' R1 ?
UF_OBJ_set_name
3 X; V' O F- ?+ B+ _ UF_OBJ_ask_name
1 q9 }+ K& \( K4 f7 H; H T& s* Z$ z7 u UF_OBJ_delete_name
6 s. X# ~# W5 Y& E6 d2 w UF_OBJ_cycle_by_name
6 k! z" Z- q, E. j$ _* X(12)和制图尺寸相关
; ~' C. z* E- u UF_DRF_ask_preferences$ j1 F5 r" e0 G0 {" l
UF_DRF_set_preferences
5 V% `9 F7 M: p- H UF_DRF_create_horizontal_dim$ ]# h6 t4 a. p9 ^. U, U
UF_DRF_init_object_structure0 `1 F& A/ U, B/ M' |4 B; f$ o% J( _
UF_DRF_create_vertical_dim- g2 m& o# A7 ~( W; ~" n* }% t
UF_DRF_create_note
8 Q" n* F2 X1 O7 w: l- [ UF_DRF_create_label* v* p5 m2 ]; w5 d
UF_VIEW_ask_tag_of_view_name
2 ~- W/ J5 L& N2 j j! c UF_VIEW_expand_view
8 M k; ^* T% b" c; v7 K UF_VIEW_is_expanded; c' Z6 W) j( O
UF_VIEW_unexpand_work_view6 I! w( d' u) d6 O& U
(13)和视图相关
" O1 J6 o7 P: r8 u uc6476 //Set Drawing State& f) R+ i$ n. ?: r" d) C( f
uc6477 //Retrieve Drawing State
0 G/ g/ O1 T9 [' S6 s9 h uc6478 //Create Drawing
, V7 u' i" |$ a, D! h uc6479 //Read Drawing Size/ t$ L& B2 \ _3 W: c
uc6480 //Set Drawing Size
1 ~) @6 {% l2 a' A UF_DRAW_ask_drawing_info
! @! o; \- n8 }1 [2 V' n, s2 j UF_DRAW_set_drawing_info. I( \9 I9 S1 w, f) d9 T
UF_DRAW_import_view S+ Q' e _2 z, Q, j. U6 P
uc6481 //Add View to Drawing
3 O( p' y7 e! Q- ~ uc6482 //Remove View from Drawing
: w" g& H( e3 } uc6483 //Read View Reference Point on Drawing! A6 l( L8 c1 k9 [/ T
uc6484 //Set View Reference Point on Drawing+ z( w8 `1 b0 {: }- O
uc6485 //Read View Borders on Current Drawing
9 L# Y# ]+ o( Y! f' E7 E uc6486 //Set View Borders on Current Drawing
" m2 c4 Z# r& R1 R UF_DRAW_define_view_manual_rec t# h6 j7 e. q& z2 b: ?
UF_DRAW_update_one_view" G9 t2 D. z+ M' ?/ w; z
uc6492 //Read Current Drawing Name: C$ t9 a( B0 l3 Q
UF_DRAW_ask_current_drawing
4 l' Q& C$ F& P9 j; h) G9 D uc6496 //Rename Drawing
+ \( l& ~/ e' Z; S0 J" I" S) ^) X uc6495 //Delete Drawing
" V) }4 P0 ]2 [6 y uc6499 //Cycle Views in Drawing
& }) p7 g8 m% j+ i& p6 n2 }4 o# g9 B7 @ C(14)和属性相关
9 h6 m( n- Y; q7 t UF_ATTR_ask_part_attribute
: [7 b7 j* @2 B% k% Z* L UF_ATTR_assign
9 l% Z; D- E4 u3 H2 p; o( W. n, f; O UF_ATTR_ask_part_attrs
/ k* `1 i7 U, p2 e UF_ATTR_ask_part_attrs_in_fi le
/ f; g1 ^! M& K) U* S UF_ATTR_read_value. s; n! k/ X" o4 O2 I# M! M; B- F
UF_ATTR_cycle
/ L7 c2 V" O7 z UF_ATTR_delete
& J/ K G! x( K UF_ATTR_delete_all
8 `8 K$ @3 M R4 ^; ^7 y: V5 u% ~$ H% P. J2 Y
) h, c0 O7 Y$ n3 \0 j |
|