PLM之家PLMHome-工业软件与AI结合践行者

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

[复制链接]

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

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

admin 楼主

2013-11-7 17:19:02

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

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

x
偶尔看见的,大家可以关注下!
' G9 H  M& M! v
4 f* O  u  j0 s, o: ^! ~- y4 Yribbon界面通过代码创建,前提是你要有准备的 .rtb/.gly/.grb  文件哦
- P$ ^! i) B0 G  r. _/ g1 |# {) P  M! n9 {0 O' ^. e
% `: z. j: o  U
- g2 m8 g) R7 ]" M7 ~4 [
/****************************************************************************
3 Z; n, g8 b* O. qCreates a ribbon from the given .rtb/.gly/.grb file. The file name should not have
( |, E2 k" z, z' I* Yany hard coded path and should exist in one of the Open application
% n- U' z% J3 V' I- C5 x( |directories. The show parameter is only used to show or hide the ribbon
  E2 F  u% D9 L- F8 Twhen it is loaded for the first time. On all subsequent loads, the show/hide
& X! e, G' Q+ ~0 dvalue as recorded in the users registry is used. " M: `$ H$ |' G: N

, ?0 B" s" J5 j1 w$ `In order to be successfully loaded, the .rtb/.gly/.grb  file must be located in the
/ ^( _2 s# o: Y0 Bapplication subdirectory of one of the directories listed in the file ! v7 t' l+ o  Y7 L9 O
pointed to by UGII_CUSTOM_DIRECTORY_FILE, which defaults to
2 g9 J4 a4 K1 X  ~- A. Q$UGII_BASE_DIR/ugii/menus/custom_dirs.dat. * \; f1 `( y3 J0 D0 M
( u( l( q, ^, U) R
Example: 7 w) X0 f# g, D, `' |
    UF_UI_ribbon_id_t id = NULL;
* d' f& `+ w' E
  _. N+ T$ m3 v' p: F    error = UF_UI_create_ribbon("my.rtb", 1, &id); - \! o3 E5 Y: X0 s2 q+ V: k2 l! w
- O) M8 R% m7 B$ R1 u3 h, s( t- E0 S
Environment: Internal
- k, S. q4 w; O9 z9 c0 z
) U% ]# }- x7 [% ?9 d) b; kSee Also:  UF_UI_remove_ribbon  
: @) o6 |' p& o2 O
# ]. v" ?6 C7 Y  y8 z, E1 k* X# cHistory: Originally released in NX9.0
8 N& f1 ]1 m' ^2 {****************************************************************************/ ( U' g/ X' ^0 _1 |9 t; d
extern UGOPENINTEXPORT int UF_UI_create_ribbon
* c. S, g9 g8 d- s/ c(
2 n5 J) Y, @2 X( G6 S- }2 U. i3 z      char* file_name,             /* <I>
: ]+ @+ i. N; f' O7 C                                    The .rtb/.gly/.grb file name without any hard coded
5 W. J. u* G/ p4 c                                    path */
$ B& q% M" B9 Q5 w      int show,                    /* <I> & G( r( }% R1 `# ^1 \) F0 c
                                    Initial visibility of the ribbon 1 X7 q. D1 T) {, p' C  }+ B/ o
                                    (1 = show; 0 = hide) */
0 \/ g5 w. m! B+ U. p1 C* Y      UF_UI_ribbon_id_t *ribbon_id  /* <OF> 3 ]. a" f+ n0 M2 |0 [( z6 i0 a7 Q
                                    ribbon id if creation is successful */ 0 X4 S  K6 K# ?: P8 F
);
! D2 [& |# e3 L6 I# S; l8 R) y5 @2 |  L0 m+ D
/****************************************************************************
! q! N! I. T' G/ V, QRemoves the ribbon with the given id. Once the ribbon is removed the ribbon 2 s$ {9 |7 `' \( T
id should not be used. " S& ~% n8 G6 h1 t
& `% V' K! D$ g- Z3 g2 q2 g1 G
Example: % [) i6 ^6 }+ n6 G4 P

6 f$ E% ]% g3 e6 ~) o9 @    if (id)
' F% j2 N, l$ R* g) ~: S% L6 n5 A( Y) c: i        UF_UI_remove_ribbon(id); # `. v* I  Z( K5 U
    id = NULL; 5 E( ]+ `( V9 N6 `) }

- m. u3 I1 \8 e; c9 IEnvironment: Internal
' h7 Q* h2 o& y  }$ T
5 \9 R% ^/ v, C. X; P% pSee Also:  UF_UI_create_ribbon  4 z4 i; e6 ]8 @, A3 n

+ H; f7 e) K" L$ l; Q8 d$ F8 [! ?History: Originally released in NX9.0
2 G9 r3 y$ t9 u' I0 e****************************************************************************/ ; L1 N! d9 v. n/ i
extern UGOPENINTEXPORT int UF_UI_remove_ribbon $ d; Y$ F$ V8 U& _- z# M
( + n9 R. g; c/ k' p3 r% b% w! [
      UF_UI_ribbon_id_t ribbon_id  /* <I>
% \, e$ p, c- R) y8 C0 W' X" w                                    ribbon id of the ribbon to be removed */ 6 J) k* `+ d1 r2 C2 b9 E1 f
);
5 q9 v6 V# J3 w* T' w2 _! o1 V3 H  R1 U
/****************************************************************************
2 o0 |: o9 N' R% hThis routine sets the visibility of a ribbon. This routine can only be used 8 s2 E6 H/ ?7 ^; L% M
on ribbon that you have valid ribbon id for.
" @! P! t' l: a) M1 l, b
# U" h& C6 W1 T  m6 u+ ?& `6 @Environment: Internal / y$ G: n. u7 o9 I- x! B
& P4 T: p" B; p* M. p1 ]/ ~& X
See Also:  UF_UI_ask_ribbon_vis  
2 D5 |# b5 T7 O* V           UF_UI_create_ribbon  2 |: _& K  m2 _' \
% i* B0 }2 W  o
History: Originally released in NX9.0
: i' v. P' C6 s7 ~  N+ o****************************************************************************/
( p. y; Z1 |1 T5 j1 M3 Uextern UGOPENINTEXPORT int UF_UI_set_ribbon_vis ' ]* o& [5 L, b# D3 s0 n' j4 g
(
1 ]7 H  x# E* A) x      UF_UI_ribbon_id_t ribbonl_id, /* <I> . ~9 r% q4 x% b7 z% e/ o( h0 J# O
                                   Valid Ribbon id returned from a call to
2 u, c1 b6 g! V  `8 e' H                                   UF_UI_create_ribbon*/
% w$ K/ ^7 a9 M/ P5 C, o      int show                    /* <I>
" `' h( D) w* V5 K0 Z                                   1 = show; 0 = hide */ 6 W8 \, z* u7 Q- K
); 5 Y" n: K- \7 j9 C# M

! g/ i3 K, x: w) }$ B/**************************************************************************** 2 d5 D( s) B3 \0 o9 L
This routine returns the current visibility of the given ribbon. ; c: U4 s* A' e- W5 G
9 k- D$ S$ c% h5 ^
Environment: Internal
8 I# U" P1 ?( _; Q
1 R) e' s) q7 X9 JSee Also:  UF_UI_set_ribbon_vis  
+ N7 \0 d0 `: w1 Q           UF_UI_create_ribbon  6 j4 e9 W3 B( B+ [5 C5 Q
9 T% [8 |6 c/ Z
History: Originally released in NX9.0 . A" b( \6 s: \1 O  b7 B
****************************************************************************/
8 J( }5 R- n$ G6 Z) i# Jextern UGOPENINTEXPORT int UF_UI_ask_ribbon_vis
+ W0 b' I! ~; ~' S" m* T* I" O( 0 f, X2 k' W, N6 N( ~% }0 A6 U
      UF_UI_ribbon_id_t ribbon_id, /* <I> + A( s6 T2 g3 T9 N
                                   Valid Ribbon id from a call to
! ]8 v9 h+ V. b                                   UF_UI_create_ribbon*/ ! S/ h# e1 j+ E7 N
      int* show                   /* <O>
. U: f% B( a, A3 E& X) C                                   1 = show; 0 = hide */ 1 p% O# T/ n& |5 X+ U/ v+ @# u5 k: k% H
); 2 I- K+ F1 O8 m* x
- ~& S! M  V  E. n! u4 S

- j$ t3 C" X( |4 Q6 m  n% W3 v8 B9 k8 J

( H: @0 V- s/ D( w! E, p7 w
, y* d* Z. y) O+ x" J! \: G2 l- r; ~* q8 o#undef EXPORTLIBRARY ! r, a' ?0 r$ j

4 Y  q0 q: |" `; N6 L% ?6 v#endif /*  UF_UI_INCLUDED  */
* s2 q  F/ M. \1 u! \
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 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二次开发专题模块培训报名开始啦

    我知道了