|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
UG NX二次开发中常用的ufun API函数大集合,熟悉这些就够了0 U$ A, R8 I* U& v; U" h3 o- u) C6 A
& m9 p; a3 t! Z! W$ j这些函数是经常使用的,可以作为参考!+ E7 \* O" K. n! L
0 D' T8 w1 V( B% |, n# N5 u/ X(1)和Part有关. h, X& C4 |% X7 k( Z$ h# H! g3 s5 [ s
UF_PART_open
6 B- w6 v; W# c$ q1 t UF_PART_close_all
( y7 r* f$ m8 P5 \/ x: z4 {3 J3 h- {7 i UF_PART_save_all; M' r" i: d( o. C4 [2 [; J/ l" b, \3 e
UF_PART_ask_part_name+ I' k* ~4 g5 _' X: B& ]
UF_PART_ask_part_tag8 s3 w: w3 J: q( Y0 q% |7 C
UF_PART_ask_units
4 i% |; R9 x. \" {' k' X- P UF_PART_ask_display_part
9 X/ F& M1 p y5 l UF_PART_set_display_part: ]. Z# b6 E9 j
UF_PART_is_modified5 c2 |: q E2 r! }
9 @& l% r1 e% ^9 y( X
(2)和菜单有关( a$ S9 K( s8 x7 E2 V4 e
uc1601 — Display a Simple Message on the Cue line! b' F, ]) q4 z5 t3 u0 n
UF_UI_set_status( q5 V) [4 w$ q4 R
UF_UI_set_prompt( ~8 U' r+ O$ t& l% g
uc1603— Display Selection Menu
8 H5 o8 l1 A( [1 [6 W! P: vuc1605— Multiple Selection Menu9 I( K4 E2 A5 z; V- g
(3)和选择显示有关
% R' _; T7 l* h Z" ~) pUF_UI_set_select_mask
* R( I: m6 u- ~+ N- [& sUF_UI_select_with_class_dialog
0 Q/ X) w4 z8 \1 t/ m! |UF_UI_select_with_single_dialog
6 O; s% V' P2 m7 u5 Z* w% K4 S, ?9 uUF_UI_set_sel_mask. j6 b+ L; l' Q4 e
UF_DISP_set_highlight
/ D0 B& s! k0 R2 {6 E |9 T) YUF_DISP_set_display3 q0 e" Y* t& S: E' D, d* y
UF_DISP_add_item_to_display4 a4 w8 L' L# h7 D' V4 N
UF_DISP_regenerate_display6 ^/ \2 n1 M" q2 e3 z% A) p. T
UF_DISP_refresh
/ N) _: `' ]# h(4)和装配有关
: c- I! E$ n; e5 e+ B UF_ASSEM_create_component_part5 t7 H$ @" i7 T$ g: j, J
UF_ASSEM_create_mc_array
r2 I t3 s+ h: @6 a UF_ASSEM_ask_work_part
) {$ Q) Z- |( `6 p h9 d; S UF_ASSEM_ask_component_data
# P: ~8 ~0 E( N" n1 v' P UF_ASSEM_ask_mc_array_data
$ c! k; h0 m9 ]( l' ]! Z UF_ASSEM_ask_assem_options D7 ?8 J% B! O' L* z w0 W
UF_ASSEM_is_occurrence' |2 I5 t8 ]8 c
UF_ASSEM_is_part_occurrence
& J& H. w! r& ~. R& g UF_ASSEM_ask_prototype_of_occ
. T7 Z4 F& y. {5 T) ~ UF_ASSEM_ask_inst_of_part_occ
2 |. r6 k; v& `3 C0 `1 C5 y UF_ASSEM_ask_parent_of_instance
! d# N8 C6 x& k UF_ASSEM_ask_child_of_instance0 T# P% |+ V' Q( G
UF_ASSEM_remove_instance0 q( }* r$ n! c! ^; Y
UF_ASSEM_ask_occs_of_entity
9 R- e' s* s# z- x& I/ d8 [ UF_ASSEM_ask_occs_of_part
i, u/ D$ ]$ g( P$ z- t UF_ASSEM_set_assem_options4 k. m6 u7 E u( Y$ @* Q& B
UF_ASSEM_cycle_ents_in_part_occ& y5 u+ X7 c0 z( ?8 a3 R
(5)和图层有关7 X; n* s y/ n0 N1 W- D& W
UF_LAYER_set_status# G" |/ t/ _% r# ~
UF_LAYER_ask_status8 A' G+ h2 l9 ~& Q% F' T2 G* d
UF_LAYER_cycle_by_layer U5 v) _9 I1 ?. |
(6)和对象相关. n9 C3 I2 u9 m9 d+ h5 A
UF_OBJ_delete_object
( n3 Y- t; f+ a UF_OBJ_ask_status
- `, G7 `" c( J2 R! N! v: o UF_OBJ_set_def_cre_color
/ D2 J9 w& V4 u/ g UF_OBJ_set_cre_color
. ^( w( I- }( ^$ j) \0 i- y UF_OBJ_ask_type_and_subtype8 ?& L# y" g6 C/ ]
(7)和表达式相关2 s7 }7 X) ?; l0 p. L
UF_MODL_create_exp1 d& }0 L; z# _* e
UF_MODL_ask_exp
, V8 y3 F7 l$ b; a* a UF_MODL_edit_exp+ P1 `) w9 @+ d& R% m
UF_MODL_delete_exp# ` _# ]5 H* [' G* i' k
UF_MODL_eval_exp0 r7 x) ?3 b6 v2 ^( ?
UF_MODL_export_exp
# e5 V; b2 ?5 [6 [' f) D- b2 M UF_MODL_import_exp
% @2 R; z$ c3 E, K; I UF_MODL_rename_exp! {8 A( Q5 `$ ~7 P8 [; s6 `6 I
UF_MODL_create_exp_tag
$ H- C1 x9 o% r* S( W0 }3 { UF_MODL_ask_exp_tag_value6 ]1 x/ n; L7 s9 z i4 b, Z
UF_MODL_delete_exp_tag8 E/ K$ k7 f1 ]( D8 D' o" g
UF_MODL_ask_exp_tag_string
! ]$ m( M! n! ?. f. ?$ S$ f( z0 n% ]+ S UF_MODL_dissect_exp_string6 @- `( v2 m+ r3 N9 m$ P
UF_MODL_update) ?+ t+ Y5 J5 B2 X6 O! g
(8)和模型链表相关2 N" [2 v4 O3 s8 ?0 b4 H: _
UF_MODL_create_list
; {% ?& C" W5 ]4 {9 D! h UF_MODL_put_list_item( q% E" N6 W7 {2 H5 r" O5 N
UF_MODL_ask_list_count
6 h# v0 [2 d3 a+ h7 X UF_MODL_ask_list_item; ] ~. W+ E F' Y( f# Z2 G7 `# _
UF_MODL_ask_list_item. f& L0 d4 J. f6 e: v
UF_MODL_delete_list8 k4 F3 I7 g* |/ u: b
UF_MODL_delete_list_item
8 |6 Q0 W7 Y- d6 [* Q% Y1 H) t(9)和创建模型相关
) O q) o/ z7 O, W) x) [# l, FUF_MODL_create_block1
( v/ F. p3 F) \1 m& j" x UF_MODL_create_blend! b9 g( ^" s8 e1 V1 L6 U& i
UF_MODL_create_cyl18 v/ g! J, j7 P. Z' s! A
UF_MODL_create_hollow$ S8 N; s8 w4 _4 }
UF_MODL_create_linear_iset1 w5 K( O6 w) s& W& m
UF_MODL_create_rect_pocket$ S' O. r& G) p) q& C4 Y4 K
UF_MODL_create_rect_slot
! s( d* U4 {. j N s$ v UF_MODL_create_simple_hole
$ {& S: {4 g" P- c& o4 ~ UF_MODL_operations7 H( x. @* ?5 K# i/ \+ n% c
UF_MODL_active_part3 G' @# H$ x3 J4 q
(10)和模型查询相关
* X6 r$ m. u, B& m2 f! k( _; I2 s UF_MODL_ask_feat_body- N. ]+ L/ v, N0 i1 s. B# P
UF_MODL_ask_body_type% f, P6 Q$ O2 G, ^5 e& a
UF_MODL_ask_body_faces
# S2 v- Q$ U' B0 M3 k UF_MODL_ask_body_edges
( T! ^, G7 t5 [: o; n H( G UF_MODL_ask_edge_body, u3 p9 [( D% v0 Q& u! C: ]
UF_MODL_ask_edge_faces
0 C/ h) Y5 q1 r- n' V7 | UF_MODL_ask_edge_type1 Q# H7 [8 R# l% t2 }& p
UF_MODL_ask_edge_verts
8 { O7 R# f% g8 O% F UF_MODL_ask_face_body% a4 y$ q& m, `% o# C% q% I" `
UF_MODL_ask_face_edges3 |8 R7 n0 L8 f; R% h
UF_MODL_ask_face_data5 t0 [" g. A# G1 ?7 O7 p) k O
UF_MODL_ask_feat_faces- z! m% u. I% p+ d
UF_MODL_ask_block_parms0 k# m9 M3 s$ j
UF_MODL_ask_minimum_dist
`+ \7 Q) @5 r, ]# m# U @7 E UF_MODL_ask_simple_hole_parms4 ^$ @8 G/ w; E
(11)和对象名称相关$ [: r8 G" @: [, w+ @ K
UF_OBJ_set_name
9 ?% ?, E& P# ~ UF_OBJ_ask_name3 _8 D1 ]- S1 W V9 ^7 m8 U) w6 U
UF_OBJ_delete_name) R. w# p- _; e3 w
UF_OBJ_cycle_by_name4 t. p5 p$ u5 q+ U
(12)和制图尺寸相关% N( [0 q6 @/ l
UF_DRF_ask_preferences
, l( o% W" i6 b6 Q6 x4 d; u UF_DRF_set_preferences2 f3 T2 o o2 x5 R- a5 R# ^8 o; \
UF_DRF_create_horizontal_dim2 H& y' T# S! R7 M1 e" A* d# a
UF_DRF_init_object_structure5 Q+ U( k0 V. ]2 n' ^' ?, P' b
UF_DRF_create_vertical_dim
- f' U9 K. ~6 q& g( D UF_DRF_create_note8 k. H- ?' s' B+ j
UF_DRF_create_label
9 A1 s" S5 H7 u( @( r UF_VIEW_ask_tag_of_view_name
- F* u( ~' ` p( w2 c9 ?# |; W$ M" R UF_VIEW_expand_view
% }1 j# b6 i) G5 ^2 D u' r" K UF_VIEW_is_expanded/ `' M8 V+ o# _4 M5 \3 W4 u; b4 K
UF_VIEW_unexpand_work_view, t/ g* p/ Z" a3 m- K, O! f! e
(13)和视图相关
' H9 V% }/ D, S7 M: Y' T uc6476 //Set Drawing State) F7 ^7 j c% S
uc6477 //Retrieve Drawing State1 \+ s0 `9 w2 W1 a g. @- j
uc6478 //Create Drawing* k" m& U! c) @2 \' {1 }
uc6479 //Read Drawing Size
) u/ r6 h8 {1 n uc6480 //Set Drawing Size: |- A' V: A; B J( _
UF_DRAW_ask_drawing_info+ E- l: f$ p8 [, Q
UF_DRAW_set_drawing_info
3 g9 G s( ~# x8 s9 [+ ^ UF_DRAW_import_view8 g* U! V p# I& W& ]3 U
uc6481 //Add View to Drawing
. L7 |$ u( R5 { uc6482 //Remove View from Drawing6 X6 p& ~7 h2 F3 B
uc6483 //Read View Reference Point on Drawing+ U" Q p: ~7 D
uc6484 //Set View Reference Point on Drawing
7 G( X6 a" m) O: t7 @/ v J: ~/ p uc6485 //Read View Borders on Current Drawing2 [% ^) c3 k& q' h0 {
uc6486 //Set View Borders on Current Drawing
: \1 {' P/ _8 Z8 Z: V$ ]6 w( g- ? UF_DRAW_define_view_manual_rec t
4 ^% g- s0 r7 s) G! R5 p UF_DRAW_update_one_view2 N& s( T% H7 B/ }, ]
uc6492 //Read Current Drawing Name
5 N3 @5 Q6 [; y# ?7 w! x0 g9 A: e+ g UF_DRAW_ask_current_drawing& D4 G8 f7 I0 t/ h
uc6496 //Rename Drawing
( r: P$ A: r7 F8 u* F# q uc6495 //Delete Drawing
5 N& d |7 [7 }& D7 v/ w uc6499 //Cycle Views in Drawing
; I5 w) ?7 P/ \2 U(14)和属性相关' p( K5 o4 A$ D4 I
UF_ATTR_ask_part_attribute
$ Q3 ^; I4 B8 [0 R2 r UF_ATTR_assign
* C5 X; C& W* C UF_ATTR_ask_part_attrs
; M0 V& g) j. x3 [2 M UF_ATTR_ask_part_attrs_in_fi le
9 K% Z# ?1 h- m4 q1 J1 @5 h0 d UF_ATTR_read_value
9 x& Y' w! Z& Q UF_ATTR_cycle1 V7 Z6 P B5 Z9 r* {1 ?
UF_ATTR_delete& Q9 v z6 x$ \& }9 L1 t# }
UF_ATTR_delete_all
7 P$ S* j( p+ V8 z( C: h D0 L/ m9 ^& T2 i" k3 B
+ ~$ u0 p4 s9 D/ t1 ^ |
|