PLM之家PLMHome-国产软件践行者

[资料] NX 9.0 上面的 ufun函数也有很多更新,比如关于ribbon界面

[复制链接]

2014-4-16 11:31:11 4265 1

admin 发表于 2013-11-7 17:19:02 |阅读模式

admin 楼主

2013-11-7 17:19:02

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x
偶尔看见的,大家可以关注下!3 W& H3 a4 }! W- Q6 k8 I
! l& _  M( K2 _/ T' h
ribbon界面通过代码创建,前提是你要有准备的 .rtb/.gly/.grb  文件哦
: b  c7 c5 ?! E; w5 [  |0 c. k
. {' S! \3 ~! o/ q% Z. a' g5 p/ I5 z6 x( m( ]

# c/ C; b4 ?5 Q& s* z; C; i4 k$ W' {/**************************************************************************** + Y9 @) u) q0 s4 t: R/ M+ H
Creates a ribbon from the given .rtb/.gly/.grb file. The file name should not have . p# n; A& ~' l9 y* g2 K
any hard coded path and should exist in one of the Open application
5 O" J7 p" @$ x- n% K& j2 Odirectories. The show parameter is only used to show or hide the ribbon
- V; U* K0 T6 i2 X; iwhen it is loaded for the first time. On all subsequent loads, the show/hide
8 `  p: N! E/ _$ V, K, }: Jvalue as recorded in the users registry is used. 8 L4 ~8 Z/ f7 E: u8 u0 G7 B

/ p" C( l; q/ r# A0 hIn order to be successfully loaded, the .rtb/.gly/.grb  file must be located in the
3 M3 o4 j1 f1 napplication subdirectory of one of the directories listed in the file 2 f1 W: V0 r& q0 f2 ?$ J! h/ Y
pointed to by UGII_CUSTOM_DIRECTORY_FILE, which defaults to
, v; L+ a( M2 Q: B2 K" o$UGII_BASE_DIR/ugii/menus/custom_dirs.dat. 7 }  r* O" P: S1 Z: U
' C" _) R2 b! m+ t3 _( n/ ?1 Q
Example: 4 {( ^; ^" Z3 e9 J
    UF_UI_ribbon_id_t id = NULL;
+ L0 m. G# g# o8 c: o  P5 C7 g4 N) h+ B& t) ]
    error = UF_UI_create_ribbon("my.rtb", 1, &id);
# k/ {& V3 T- U- w$ H& B( W+ ~2 [$ c1 U. G4 D- N0 J  K
Environment: Internal # J' ~' t4 y1 ^

. R) P9 a7 G  ~See Also:  UF_UI_remove_ribbon  2 Z# F4 v8 y4 V7 S  Y6 r- A

7 F9 Y# |8 T7 V- M, U) F+ dHistory: Originally released in NX9.0
) O" D  a8 [8 O* Y****************************************************************************/
. R( A& Q4 f) m8 T1 T6 Z8 @extern UGOPENINTEXPORT int UF_UI_create_ribbon
' N7 @+ ~2 x+ c2 N2 W3 N(
! Z3 C) h  h. C* Q! u) `      char* file_name,             /* <I>
; |% M% o# ?" e8 v  |3 t                                    The .rtb/.gly/.grb file name without any hard coded
' ^0 U+ e( L0 W- `# B" j                                    path */ ) Q6 v) B6 k( o- V) _! G
      int show,                    /* <I> 4 L  F5 B3 T& j; N- U& d: Z" Q, e
                                    Initial visibility of the ribbon 0 s) U/ O- E2 R; p
                                    (1 = show; 0 = hide) */
8 }4 M$ }; E) E( P4 i' d( d      UF_UI_ribbon_id_t *ribbon_id  /* <OF>
  E! }0 y5 j$ p) d5 F                                    ribbon id if creation is successful */ 2 r0 s5 Q" Y/ h8 @/ q, b
); 9 `2 X/ N9 ~" `5 }: J& x7 u

# U$ ?. A* L0 U1 K" B/**************************************************************************** # V) k1 s) m: M" e. |
Removes the ribbon with the given id. Once the ribbon is removed the ribbon
; g& d" Q! @, vid should not be used. * j( T/ f! ~6 p% O% _$ \  b7 E
) ~* {2 L' o- H# I" v7 d/ c" C- v: |
Example:
: l8 L+ n3 `8 l* R- j/ N" {) d3 ~
2 c* i7 R- a, s' ^/ d& H/ B    if (id)
% Q- l6 L6 f4 n7 i* F        UF_UI_remove_ribbon(id); ! ~- ^7 z) i) w% U# g
    id = NULL;
2 F5 X  g0 m# T/ d  {1 ^" h( G, t+ P: Q3 u8 J- N' \! d
Environment: Internal
, u  x# C: @  S) F( H
/ v# |/ J' u5 X4 f+ i( z# B) ], hSee Also:  UF_UI_create_ribbon  
2 h. ?  c9 O/ @1 m+ b! x* \
; ~' g& ^2 S4 O3 h* @History: Originally released in NX9.0 ( w8 |8 y' y8 `
****************************************************************************/
' W' B4 ~2 f! u+ i2 }! Yextern UGOPENINTEXPORT int UF_UI_remove_ribbon ' m, r& t9 |; r' \
( ' @0 r* C5 P7 a; o* A9 ]# p- m
      UF_UI_ribbon_id_t ribbon_id  /* <I>
0 ~/ K+ l* B5 c                                    ribbon id of the ribbon to be removed */
% q9 R! k/ x) u! q: s. a) Z) Y5 V1 o); ( C- H' Q! x$ v- ]0 ]2 b/ Z' a- f

; n6 O* W. }/ q* ]# V/**************************************************************************** 8 a8 S+ q, Q  G4 S
This routine sets the visibility of a ribbon. This routine can only be used 3 a2 m* k6 I2 _/ ~
on ribbon that you have valid ribbon id for.
: o- J! r7 {% J  G
% y- ~* z$ D& Q3 S# S/ TEnvironment: Internal
3 {  J- [$ ?6 f3 }1 I4 S- z. s. R; ^: v
7 [$ F- d5 i% U; ]" U1 CSee Also:  UF_UI_ask_ribbon_vis  ; e* R+ ]+ |9 \7 h
           UF_UI_create_ribbon  
+ H5 f- x, V. \9 q# [! m% Z6 N8 Q8 p3 L, ~. l; J/ ?% e& u8 }
History: Originally released in NX9.0
, g. F" r: b: Q4 y****************************************************************************/
3 J0 n" c8 w( D7 R$ N% A% oextern UGOPENINTEXPORT int UF_UI_set_ribbon_vis
0 L) X# h. [+ t4 c$ n4 S(
8 u  I! O+ Q$ B, k      UF_UI_ribbon_id_t ribbonl_id, /* <I> + Z5 y7 F( y9 ?5 p3 }
                                   Valid Ribbon id returned from a call to " i# F) r8 W2 d/ f( ^( g5 V
                                   UF_UI_create_ribbon*/
7 a; I3 A' p$ \1 P/ P      int show                    /* <I>
7 E9 }$ M7 B8 P  B) M) K2 G                                   1 = show; 0 = hide */
. _5 Y! Q/ R3 k) a5 c, j: e);
; R9 I7 ~: n8 `. G0 ]) K3 c1 G0 u6 ]/ g6 I) w: B- M2 B
/**************************************************************************** 5 c2 m4 a) F9 G
This routine returns the current visibility of the given ribbon.
& a! [/ B2 T" Y4 f% p
# A' x: D3 V" Q; z6 kEnvironment: Internal
0 b% o" K: \& h! q) Q$ ]& m! q0 l; L+ n5 e% t, t9 M# v
See Also:  UF_UI_set_ribbon_vis  
# I5 d9 B+ t; j" @: i4 s           UF_UI_create_ribbon  
; l6 V& R+ T( V6 p
) V  q2 c2 O0 q. l! y- _7 fHistory: Originally released in NX9.0
1 C, [/ [) i$ M) `  S6 r  I: s$ r: L****************************************************************************/
$ z) K3 a/ s8 d" {9 E/ Pextern UGOPENINTEXPORT int UF_UI_ask_ribbon_vis ) |3 S0 F8 _% ~, J: w/ ~, }
( ' L+ _" ~2 k4 v
      UF_UI_ribbon_id_t ribbon_id, /* <I>
; ]1 F; W2 t9 ]; Y3 g$ [                                   Valid Ribbon id from a call to / h4 E/ O+ p3 j( x4 p+ w
                                   UF_UI_create_ribbon*/
, r, |! C8 T7 G0 E9 r% _9 U      int* show                   /* <O> * Y) C5 v* K' D1 L! @6 [
                                   1 = show; 0 = hide */
" u8 V) r. x. L0 d9 {);
' w" S7 a; Q2 `+ I0 a4 R: \" S" ~1 ~2 b7 P
8 q6 H; y& ~, m4 |9 s
/ P( f6 E( z) X% v- U$ H& H

" `5 p9 ]( V# s2 f8 [  @
, q- Z6 s0 S, u8 ], R3 v- `) m- a#undef EXPORTLIBRARY
4 P2 b: U. Q+ I- g8 ]8 n# B3 b, v0 g% a- e6 `, Y7 o# m& u+ u& O
#endif /*  UF_UI_INCLUDED  */
( W7 N$ O# ]9 _& f9 d- L$ i
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复

使用道具 举报

全部回复1

Buguin 发表于 2014-4-16 11:31:11

Buguin 沙发

2014-4-16 11:31:11

求问大神,二次开发函数在哪查询?帮助文档已经下了,没找到函数呀
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了