PLM之家精品课程培训,联系电话:18301858168 QQ: 939801026

  • NX二次开培训

    NX二次开培训

    适合初级入门或想深入了解二次开发的工程师,本培训结合ufun,NXOpen C++,大量的实例及官方内部的开发技术对于老鸟也值得借鉴!.

    NX CAM二次开发培训报名 NX二次开发基础培训报名
  • PLM之家Catia CAA二次开发培训

    Catia二次开发培训

    Catia二次开发的市场大,这方面开发人才少,难度大。所以只要你掌握了开发,那么潜力巨大,随着时间的积累,你必将有所用武之地!

  • PLM之Teamcenter最佳学习方案

    Teamcenter培训

    用户应用基础培训,管理员基础培训,管理员高级培训,二次开发培训应有尽有,只要你感兴趣肯学习,专业多年经验大师级打造!

  • PLM之Tecnomatix制造领域培训

    Tecnomatix培训

    想了解制造领域数字化吗?想了解工厂,生产线设计吗?数字化双胞胎,工业4.0吗?我们的课程虚位以待!

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

[资料分享] 关于NX二次开发 Ribbon菜单定义技巧

[复制链接]

2018-12-25 16:10:57 1799 0

admin 发表于 2018-12-25 16:10:57 |阅读模式

admin 楼主

2018-12-25 16:10:57

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

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

x
! R1 p3 ]- {- p; |/ m

  K* z7 f6 \! q5 M5 J3 q
6 D- g9 ?# T9 x7 u( d
9 r& [/ v/ H1 E+ e  J: w* t8 W首先认识下关于菜单的后缀文件
8 J4 d+ d2 n9 T5 h; ]6 R$ R/ Q% `( M- ~4 E( u% O2 ]
Extension
UI object
.tbr
Toolbar
.grb
Group
.gly
Gallery
.ddb
Drop-down
.rtb
Ribbon tab
.csb
Cascade
.abr
Attachment
9 Y9 |+ d7 q' K/ Y7 e; d) a5 U% O
! w7 \: w* U: K- o0 G
RTB作为菜单ribbon 界面定义的关键,详细信息如下& ~: \; \6 m) x; D# ^4 N
3 z8 q& l; y" z9 S5 A& c& Z# n
- v5 w) ^4 O- [# g: `3 v
customer_ribbon_tab.rtb
% H1 E/ d8 s! ]' ]!) }9 `& ]* X# I! o( _, Q; y
!  Customer Ribbon Tab, e1 S& y9 J8 m% S! r% g( ~
!
3 L) g6 ]  ]) R( }+ o$ U!  This file will create a new customer tab containing three groups and1 [2 P# w$ z+ j8 q& ?( Z$ v
!  one top level button.
5 ?* u9 g# ?; b# }* u. t!
  ?3 q. x: r9 M$ j" ~
/ g- |" V; ~& x5 WTITLE  Customer Tab
* U1 x5 M4 |) F& I" f2 x8 {; S" dVERSION 1709 Q  {. H" m7 Z0 A' J# O: l

3 t; n) h4 f% N' n/ H! }!  The first group represents a Ribbon group that references an existing 2 |+ O4 P0 m9 ?' A/ V
!  toolbar with no Ribbon style changes.  ' ~& _' t1 {+ }3 P& `7 z2 b5 n
!
% z$ G) {8 Q/ _2 A/ K* d3 v& Q  A!  This is the quickest way to add existing toolbar content into Ribbon mode.; l  V. O: a3 G3 a& N
!) \! @; G, y- A. e, p0 J
GROUP  customer_toolbar.tbr0 @) G+ G. N' v# }+ d: C# C2 N: V& }
! 如果想直接切换tbr 到 rtb,这是最快的 ; J, K2 X" b' ^8 R
!  The second group represents a Ribbon group that references an existing 7 I  S  E: T3 u4 _7 u: O
!  toolbar with Ribbon specific style changes added to it.  There is no difference* c% F4 O$ u. F8 M- J+ i  i' z
!  in how this toolbar is referenced in the .rtb file compared to the first
  x& r( |# N! H!  toolbar as a group.  The only differences from the first group exist within
7 y( V/ h- A( ~. G/ U!  the .tbr file itself.
% |! L/ f( V+ y9 V!* P7 T0 @- O  Z" R
!  This approach has advantages for customers that will deploy both Ribbon and2 L/ d/ u7 f+ l% ~/ d
!  Classic Mode customizations since all the content is defined in the .tbr ! ^( n( p) m' t' i
!  file and it will stay synchronized in both modes.  Only one set of customizations
7 k% w. h+ ?; e; n6 x1 s!  will need to be maintained while still making use of RIBBON_STYLE to
. x8 a3 K: L1 w. i% [% g!  control the presentation of the buttons on the Ribbon.' ^! Y2 M* s2 a" ?' b
!3 ?6 |2 i8 E$ x, k" |$ S- Z2 f
GROUP  customer_toolbar_alternate.tbr- x+ n7 Y, v7 z2 d7 [
7 F& ?' u2 r$ E1 c# @6 k
!  The third group represents a Ribbon group that has been created explicitly
  ], _. q9 _4 G; p1 P: }3 g!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the
2 G: |( y& ^: H( Y1 c!  preferred option since the user will be able to take advantage of all the $ z8 {2 e9 o5 \, _: V
!  layout styles and containers offered by the Ribbon.  4 d; e- P: O3 c& {5 Q4 H4 j3 x
!
7 L, K2 c% X- G  _) z2 f; t" w!  For customers that will deploy both Ribbon and Classic Mode customizations, 7 R- _9 S; m; t* c+ {# S' d( `( X
!  this approach will result in no synchronization and two sets of customizations
& Q) q; p4 r- e( i( R* _!  will need to be maintained.
3 b+ }1 \% w% o4 ]!0 L$ @7 K! L3 b: z8 j1 U  d
!  A group can alternatively be defined directly inside the .rtb file by using the
- o9 {2 f; B* @! I  n( G!  keywords BEGIN_GROUP and END_GROUP.  , j9 J3 [- I8 g6 @# m: t4 u
!
9 u" A  @- Q& P4 p. L  c" zGROUP  customer_group.grb
0 P4 D6 L4 `) m5 f3 G  \* Q, h8 i! Q8 O* X' }" B1 l7 X" L6 L) W
!  Example of a button that is placed directly on the Ribbon without being
$ M  W* B8 y4 V0 d. u!  contained in a group.  This is a simple way to add a button to a tab9 n7 z8 f- T8 J0 \$ F, \0 I. m
!  but is not recommended for many buttons since groups have advantages.6 \: i$ i! x' z! f4 I" a
!  
! _" }, ?5 s$ y% K4 K!  A few advantages of groups:# D3 N+ b% S8 D
!     1. Easier to move many buttons around together in quick customization.  8 b/ a6 W0 q! c; [' ^* f
!        For example, MB3 on a group and choose "Add to Left Border Bar".  
9 q" `' m1 L9 y0 Y. ~3 `, E!        This will move the whole group to a new location.  If buttons are
. b2 c) t2 [  @: @9 y9 H. \* y* e!        not in a group, they need to be moved one at a time.
& w, r4 I) f; L, f: }! |!: u: w' Q# ?7 Z' u5 ~
!     2. Provide a label to describe its contents.. e" D* n4 f# F& n; u, q9 E2 @; F4 r
!" h7 Q. h! R: A; S
BUTTON CUSTOMER_BUTTON_1
8 w, h: |& u% k# ^  p( K  q( lLABEL Button1 Directly on Tab

/ f% e3 C! h; `3 |  f  X

( K- L+ G/ v0 a$ M
部分菜单可以单独写成group gallery 作为对应后缀,重复调用
( L' c; T; g3 W  u5 c/ d. F" E3 B!  Example of a gallery defined in a GRB file./ I$ |7 V, X) D* s5 I% T0 V) O
!
  T1 M0 a5 k! L3 l8 e6 P!  If this gallery is to be used in other places, then it could be 5 \4 r  ?' o$ U1 I
!  defined in its own gallery (GLY) file and referenced here
4 q4 G1 i; e% s3 F; Y% g. G7 K5 \!  Example:
) t8 `' p! i. x8 m!    GALLERY customer_gallery.gly
8 k# K8 I( ?0 m0 F# ^/ `!+ E8 n9 H- a; F  Q& U0 y4 c
BEGIN_GALLERY  CUSTOMER_GALLERY
# b3 J9 c5 ]7 v  }- zCOLUMN_IN_RIBBON 2- n% h* ?8 X& G$ @
COLUMN_IN_POPUP 27 P/ k/ a( b( E0 C" [. E
LABEL Gallery  A" x% p6 `6 I1 s' p4 V' `
GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
4 k5 }/ r6 L# N6 J: ?5 w9 U  e% `6 x  A2 i& {, U7 Z' F+ `# C# O; v+ F' ~
    BUTTON CUSTOMER_BUTTON_2
/ ^6 j+ B. K4 p4 F   
8 A2 _3 u" v$ X5 x    BUTTON CUSTOMER_BUTTON_3
+ G$ j% l  z/ E% J: W" c    . d! n9 P8 K) S0 D2 o# F% N
    BUTTON CUSTOMER_BUTTON_47 W$ _# |6 x6 `" Y
   
/ N0 U0 Z. b9 n9 G( W7 ~    BUTTON CUSTOMER_BUTTON_5+ [1 j7 L3 i& `; C1 A* a
   
( |7 U0 O6 ]* h! a$ i3 |3 ^END_GALLERY
7 l: ^- Z6 w; n

/ T7 G: ~# f: r  K
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了