|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发中常用的ufun API函数大集合,熟悉这些就够了1 ~3 f' y9 D# }3 Y
6 h6 K9 s& n# E# J3 k; p! Q- S这些函数是经常使用的,可以作为参考!- h7 w; l* J8 j% e% T7 N8 m
9 W$ l0 i! Y) Q# T# ]
(1)和Part有关
' Z5 i w: h* U* U UF_PART_open; `- `, p/ [- J. W. u8 Z) I+ {
UF_PART_close_all
' p) a9 E6 {0 j UF_PART_save_all9 K, `7 {5 l1 i( k7 Z3 A
UF_PART_ask_part_name
9 b! E* g8 @5 ` UF_PART_ask_part_tag
, S: `& P) U$ b9 ?1 \( I UF_PART_ask_units1 j. [$ b$ k- q$ a* R9 f1 n# L9 [ o1 V
UF_PART_ask_display_part0 C0 M4 B( M; ^5 d3 \
UF_PART_set_display_part* v# f! ~. h3 a+ J" L
UF_PART_is_modified
. Q& v$ a8 _& R, D- M0 o, Z5 Q
; D2 A0 `+ p. X# \0 q1 A(2)和菜单有关; n: `4 B& \- Z( y) E9 R5 ~' P
uc1601 — Display a Simple Message on the Cue line
, L2 Y8 W) u$ U' h) Y# l) MUF_UI_set_status/ D5 M ?* E0 R/ l7 ~. I
UF_UI_set_prompt# V" I- E1 {' ]3 t9 o% U, ]
uc1603— Display Selection Menu
]% i: |+ ^' v4 O% j8 }% ?2 J6 Duc1605— Multiple Selection Menu
6 N. W* t! l9 Q- Z( {! [0 y- H(3)和选择显示有关) b* L( }) k2 E8 ]/ Q; g
UF_UI_set_select_mask
l+ J, J# w% V* D t: C) iUF_UI_select_with_class_dialog
) @! @. \8 q0 J8 y$ _2 R4 MUF_UI_select_with_single_dialog1 x: |. T* u- m7 Q& }! Z3 ~
UF_UI_set_sel_mask
9 Y% {, P2 F, K: S; ?UF_DISP_set_highlight& L+ g! T7 W8 F: }! g' A1 U& C
UF_DISP_set_display
/ a9 m/ a) W. t$ n* VUF_DISP_add_item_to_display
* O8 s' Q; l; x, `2 jUF_DISP_regenerate_display. E5 ^+ m/ ~ V( M1 m% u
UF_DISP_refresh
# [1 L. x' F6 ~ ^# I) ?# V3 } f(4)和装配有关
" R, l# a* D: r# X/ I+ N UF_ASSEM_create_component_part! b8 n/ e6 o% X
UF_ASSEM_create_mc_array* g: X% s1 X3 G d
UF_ASSEM_ask_work_part
, \# J: u' G+ n! H UF_ASSEM_ask_component_data: @0 x" E3 Y( u: i( {
UF_ASSEM_ask_mc_array_data
- y8 f* W5 i* F UF_ASSEM_ask_assem_options5 A% {6 I0 r5 ~+ _
UF_ASSEM_is_occurrence
v( c; [7 |/ A5 w: C2 P UF_ASSEM_is_part_occurrence
1 ]6 d$ r& i5 u: Q# x UF_ASSEM_ask_prototype_of_occ4 V- z+ f' E& c7 D
UF_ASSEM_ask_inst_of_part_occ
5 w ]" {; s+ w" n# d4 n4 E0 e UF_ASSEM_ask_parent_of_instance
7 ]4 F- b# r5 |- i7 C UF_ASSEM_ask_child_of_instance Q$ j3 b3 O! p% D! B$ x: p- u
UF_ASSEM_remove_instance
1 X) {- c9 l' T- v UF_ASSEM_ask_occs_of_entity5 h/ @5 O. Q% A' g& {. e
UF_ASSEM_ask_occs_of_part
1 Y, a' V+ `7 `6 X2 H/ t# b UF_ASSEM_set_assem_options
1 |8 e6 y0 [, t. s5 A UF_ASSEM_cycle_ents_in_part_occ
0 A+ b- ]$ [5 O: b(5)和图层有关
1 N0 y+ p- t0 c; T$ w- j$ u UF_LAYER_set_status: {9 U/ L1 F ~0 @5 B8 ~
UF_LAYER_ask_status* { I' H1 C, @8 a3 d X
UF_LAYER_cycle_by_layer
m. R/ ?) D3 {3 b1 x2 T3 W N (6)和对象相关 C6 f5 I" x5 O m3 C2 ?( g
UF_OBJ_delete_object: @( [# B. f; |; d9 n, T% |- r. X
UF_OBJ_ask_status
1 e# E% s5 ]* N- ^. R" c UF_OBJ_set_def_cre_color
( X2 [6 U) _8 ]# S m UF_OBJ_set_cre_color
( l0 W: ~5 R* X0 Z& z* H5 l/ x UF_OBJ_ask_type_and_subtype8 Y( b) o8 @+ x6 u' H1 W- H
(7)和表达式相关( _; y5 U/ V( W. l0 X& _+ B7 ?
UF_MODL_create_exp
1 o4 h% b. o P9 K$ u UF_MODL_ask_exp! J; @* v$ z9 u& A# m3 n) t
UF_MODL_edit_exp
( x* x, g( X# s UF_MODL_delete_exp+ S8 |" N# s- Q. x2 s# ~: ~
UF_MODL_eval_exp$ ]0 w$ s0 } O- Y2 p% O/ I
UF_MODL_export_exp
, v4 I/ M) b! P& l7 c UF_MODL_import_exp8 r. s. A# Y( j! h/ m
UF_MODL_rename_exp- Q% \% z- W4 b* `! w, ]
UF_MODL_create_exp_tag
' i& a( \) ~0 \& b% a UF_MODL_ask_exp_tag_value1 F$ D/ X8 L( M# o
UF_MODL_delete_exp_tag
# Q( K1 p) ]* d; X# y" [7 s UF_MODL_ask_exp_tag_string1 g9 q/ C4 v0 z# q6 I6 h2 l
UF_MODL_dissect_exp_string1 F, N; f1 D2 R9 _; U7 Z* j
UF_MODL_update6 b. R- O/ S. K, s1 f' a8 B
(8)和模型链表相关
$ Q s& L( b0 a$ o UF_MODL_create_list2 I' e |+ @9 f! p1 a
UF_MODL_put_list_item# t% N0 f f, L) D1 W5 n
UF_MODL_ask_list_count
3 \) z: D x, h, ~* d" h UF_MODL_ask_list_item
9 ^2 C: b) \& ?* P UF_MODL_ask_list_item
6 Y7 i) ?; I9 N* t9 `9 s$ `. }# s UF_MODL_delete_list0 X5 o( Z$ O/ n+ ^2 f P
UF_MODL_delete_list_item# |6 c. e1 Q; X/ ]/ T
(9)和创建模型相关
C& u5 A! J; Z1 GUF_MODL_create_block13 z8 ^$ V: w$ R
UF_MODL_create_blend
6 `! y+ w7 Z6 [' ]% [ UF_MODL_create_cyl19 ]" m+ M' X Y' n! e1 m" b6 a
UF_MODL_create_hollow, N! I2 z2 r% n4 R8 ]% [# a
UF_MODL_create_linear_iset
0 s5 p. C# _9 z UF_MODL_create_rect_pocket* i4 w/ n" l# l( m* _- M
UF_MODL_create_rect_slot
1 ?( Q5 Z. b. b& {4 N5 k) G7 P O UF_MODL_create_simple_hole
* s, f; A6 ] }9 E4 d" Z UF_MODL_operations
, i) z1 I$ t$ n6 `0 f/ G' A UF_MODL_active_part
! o. g( Y! J6 U5 _(10)和模型查询相关
! ~/ |& @% l- R. \5 E3 L3 ] ] UF_MODL_ask_feat_body
+ Q/ g3 B8 H9 J; U UF_MODL_ask_body_type1 `. ?1 E( ^0 k) a$ f- W
UF_MODL_ask_body_faces& ^6 T! |" Q- H5 N3 ?
UF_MODL_ask_body_edges6 ?, M) y& J3 {6 l! N* m
UF_MODL_ask_edge_body* x% u3 n: l$ u$ r5 k
UF_MODL_ask_edge_faces6 k9 l) L! i0 g
UF_MODL_ask_edge_type
! Z- p& P. ~) \1 `2 F* L4 N UF_MODL_ask_edge_verts
+ j5 J8 e; G: m$ O! I UF_MODL_ask_face_body# @& |( e! G7 u, Q% k( Q$ D5 w
UF_MODL_ask_face_edges
& `) E8 K' |7 d' x UF_MODL_ask_face_data# Y% w1 |: J$ e' b& l' h, A
UF_MODL_ask_feat_faces
* \4 b- a- `$ Q- S: G UF_MODL_ask_block_parms
( ?4 M$ N+ H# z+ e6 I UF_MODL_ask_minimum_dist
& G2 v& m9 J# S4 z! I UF_MODL_ask_simple_hole_parms
4 b, b8 I8 r. p7 N+ R) m(11)和对象名称相关+ j0 W- E: U6 [9 i* A
UF_OBJ_set_name1 }$ G# B( `7 q+ L; v0 r0 m+ P
UF_OBJ_ask_name+ w0 w0 h' z8 \: b; G j1 |9 Z5 f
UF_OBJ_delete_name) O* B: [! ^! ?6 g
UF_OBJ_cycle_by_name
, e* V+ A7 {, X- i(12)和制图尺寸相关
- Z1 R4 | ^ I% K J# ] UF_DRF_ask_preferences
" R5 ?3 b f* `4 C! \ UF_DRF_set_preferences
Q' ?8 l' A) E* s1 [ UF_DRF_create_horizontal_dim7 d* `& a; v$ _( K' d
UF_DRF_init_object_structure
+ z! F; r" G' D2 l: s UF_DRF_create_vertical_dim9 {4 h v) g$ J0 p
UF_DRF_create_note* a9 i% R" t$ N; l1 {
UF_DRF_create_label8 X1 i8 l: H0 g6 i) ^$ J8 v
UF_VIEW_ask_tag_of_view_name
4 _9 _; z n. r5 N UF_VIEW_expand_view- k7 C0 d! l$ w0 z0 ]
UF_VIEW_is_expanded
8 G/ }: A% d6 w0 ?8 Y5 D5 B UF_VIEW_unexpand_work_view* a6 n6 F7 b! W3 k
(13)和视图相关6 R8 i0 u" k: A5 f& L: \
uc6476 //Set Drawing State
/ m# n* V- w# U+ s# d( l# O2 m4 z8 s& _ uc6477 //Retrieve Drawing State( {' Q! g1 \. \! p$ _. a+ p
uc6478 //Create Drawing0 i8 c3 F0 S$ z: b+ ?7 h$ W& S
uc6479 //Read Drawing Size8 g8 |* i3 \+ T5 @+ w3 g5 K- j- p
uc6480 //Set Drawing Size
: k* n |+ ?- [( O- h# Q UF_DRAW_ask_drawing_info
2 P2 w: O8 [& b j% k6 S9 _' F UF_DRAW_set_drawing_info4 |! s6 U! u* q: [ y c& U
UF_DRAW_import_view
) d4 Y" B- T& i* z, n8 t2 Z uc6481 //Add View to Drawing
+ v: o9 y7 u7 P$ U o' k uc6482 //Remove View from Drawing
& \: G# F0 C' Q) g) I uc6483 //Read View Reference Point on Drawing
7 l6 o5 |; g4 H @ uc6484 //Set View Reference Point on Drawing
1 |6 B: u; s, q8 A6 `# f s* P uc6485 //Read View Borders on Current Drawing D; M6 x/ T. M; {9 c+ F0 X
uc6486 //Set View Borders on Current Drawing
/ q# B6 q8 C( }9 t4 k/ G: G UF_DRAW_define_view_manual_rec t
2 e0 a/ c1 a7 }' t! N UF_DRAW_update_one_view3 N* [" {7 X" \" `5 I. O
uc6492 //Read Current Drawing Name
5 B0 ?2 F' k( i& P UF_DRAW_ask_current_drawing5 h! C2 t/ b, C3 T7 R e
uc6496 //Rename Drawing1 F9 X u( O- N5 x. [* Y: c9 P) v
uc6495 //Delete Drawing) z$ i, P$ Y" k/ b
uc6499 //Cycle Views in Drawing. Q9 r$ T& _$ ?3 n$ t
(14)和属性相关) I# q! X8 x! r: u1 @# _1 e
UF_ATTR_ask_part_attribute
/ |) L$ h; A3 Y( d' N UF_ATTR_assign" ~7 W9 f7 n2 r+ N: Z# |" r
UF_ATTR_ask_part_attrs1 J* J5 |, X4 `8 v! s& s
UF_ATTR_ask_part_attrs_in_fi le. w: a. X6 X/ k" r/ }! J
UF_ATTR_read_value
* h6 q, |/ |" M UF_ATTR_cycle
% o, b: i2 Q, ]0 R( `4 l/ g UF_ATTR_delete S6 S6 M0 h+ M' Q
UF_ATTR_delete_all
7 m0 b7 a2 t# f9 B9 `; W& x, ]" U7 X/ A6 M8 N- P" U3 V. d
+ o/ r' R/ j3 X% [8 {6 {
|
|