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 2082 0

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

admin 楼主

2018-12-25 16:10:57

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

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

x
5 P+ _5 G/ M9 G3 r0 r, x
; _6 ~- f% s+ Z* u' V

2 M; [' |" |: W$ _1 k8 i8 m& b8 ~' z7 _
首先认识下关于菜单的后缀文件% ]% O; O2 u9 J, O& U
! @2 B$ Y& ], i7 v6 `: W
Extension
UI object
.tbr
Toolbar
.grb
Group
.gly
Gallery
.ddb
Drop-down
.rtb
Ribbon tab
.csb
Cascade
.abr
Attachment
7 n6 q9 i" _9 W3 k# Q* P

% W8 E. Y/ H& @4 Q% W: O0 nRTB作为菜单ribbon 界面定义的关键,详细信息如下0 x7 K9 Q5 v+ ~+ Z" j& c

7 o; G! A; Q& F2 Z7 _( \: H. d8 D, b5 ^) v- i1 Y: v. l* E, R
customer_ribbon_tab.rtb) @0 |( X7 J. ^5 q8 C: \
!4 @: n% K& @1 e  m. I9 e6 K# Y# b, d
!  Customer Ribbon Tab
+ Q6 |# n3 s" V+ [!
# @! ~) X8 u2 _* c0 F' N!  This file will create a new customer tab containing three groups and
! B- |( u# S$ T9 ]3 f) n! ~1 A!  one top level button.4 J, G7 _: C1 N
!
! K4 d6 \/ W5 q+ D
2 U- c. G8 p+ H$ p! P  e  M6 ETITLE  Customer Tab* g* v( \' y- @; U4 G" N
VERSION 1702 |5 ^, \" c; D( L4 E. h, R

1 y* d  _0 B6 o- R7 a!  The first group represents a Ribbon group that references an existing 5 z' n: p  C" @* K+ Q; l
!  toolbar with no Ribbon style changes.  
3 i; u: J9 o8 y1 c! {* L! L!
/ I: c3 ]0 \& g4 z' r( n! ~8 \- w!  This is the quickest way to add existing toolbar content into Ribbon mode.4 e8 e3 b- k  f1 \. P5 J+ G. w+ P
!
' _9 H3 H" c* @8 P
GROUP  customer_toolbar.tbr: {* z5 B: ], K8 o8 ^, r& L
! 如果想直接切换tbr 到 rtb,这是最快的
" r6 v' B  I1 g& f!  The second group represents a Ribbon group that references an existing
2 P: w6 D. l- m8 R!  toolbar with Ribbon specific style changes added to it.  There is no difference* ~: x+ B5 M  p1 n# I
!  in how this toolbar is referenced in the .rtb file compared to the first
6 [$ r( o+ t* X/ }; f% T, b; {!  toolbar as a group.  The only differences from the first group exist within
. D( c3 c. o% {5 U5 M!  the .tbr file itself.
1 z: q2 \0 c4 z# @9 g+ c* k5 R!- c/ [: y9 o3 ~$ r2 x
!  This approach has advantages for customers that will deploy both Ribbon and% o( M# j) w+ H: ]1 L8 z
!  Classic Mode customizations since all the content is defined in the .tbr 2 r& L# L. [& T, p
!  file and it will stay synchronized in both modes.  Only one set of customizations& s5 f/ d" T) Q% W+ K
!  will need to be maintained while still making use of RIBBON_STYLE to
" B0 T9 [+ [( E2 m0 y8 _!  control the presentation of the buttons on the Ribbon.- s% A7 m; A& N- G  n3 y) R
!( S4 C* y6 Y9 S- N, ]& [
GROUP  customer_toolbar_alternate.tbr$ K5 ?0 r$ W$ f, x# }% A

! d; X: X, C' m: R" O!  The third group represents a Ribbon group that has been created explicitly! Q4 m$ o- ?  G0 D# o% n4 x  ]! V
!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the# h5 r# _9 y& g" ?
!  preferred option since the user will be able to take advantage of all the + z6 ]- P" g* T. m  I" s% a
!  layout styles and containers offered by the Ribbon.  0 a! s# G; \# c9 x! N' G) ]
!
! R; b8 S+ g! `) N!  For customers that will deploy both Ribbon and Classic Mode customizations,
- I% i8 n' `) n!  this approach will result in no synchronization and two sets of customizations
5 P. u. P5 q2 t6 D/ ]!  will need to be maintained.3 ]: B$ e: D$ d4 e3 v4 Q
!- _* ^5 R5 ]* o6 N) c
!  A group can alternatively be defined directly inside the .rtb file by using the$ T8 A7 Y4 B0 U# Y6 A! ~) D
!  keywords BEGIN_GROUP and END_GROUP.  & K- Q8 z4 ]$ z; q
!
, S$ x9 g  j& B3 oGROUP  customer_group.grb9 o3 }  X! \7 W1 B+ p
' R: V- T* X3 Y) B8 ]! W; O
!  Example of a button that is placed directly on the Ribbon without being' Y5 b( R6 V' w; P
!  contained in a group.  This is a simple way to add a button to a tab
: Z7 E% V" R* ?!  but is not recommended for many buttons since groups have advantages.& R/ F* W7 @& B1 {5 P: M
!  
! S3 Q/ `6 y& N!  A few advantages of groups:
4 P  }+ v2 D' K" R+ U7 a; J3 e!     1. Easier to move many buttons around together in quick customization.  ! m% g# n. u4 g- E3 F
!        For example, MB3 on a group and choose "Add to Left Border Bar".  
. w  M1 M" N9 ~!        This will move the whole group to a new location.  If buttons are : o- p) b% W" S' j
!        not in a group, they need to be moved one at a time.6 x- T1 h6 X' f( h, A& L
!
2 o- @3 J) J& ^' L# Y1 g!     2. Provide a label to describe its contents.; J7 d1 t8 Q2 F7 ]
!
  M0 a9 z  P8 T  G$ y1 u7 pBUTTON CUSTOMER_BUTTON_1
) [- D3 f3 q$ t; l1 l. }" [LABEL Button1 Directly on Tab
) o9 u8 Z0 D" P" G- Q
8 h& n5 X, j- B6 f" ]8 }, y
部分菜单可以单独写成group gallery 作为对应后缀,重复调用
- c4 d7 R. B, h1 {!  Example of a gallery defined in a GRB file.
. a/ D* o, I9 E9 _. n" V: B! ( z0 F6 ]+ @; Y( O7 F) `
!  If this gallery is to be used in other places, then it could be
% H6 n4 Y% P, S* S3 H!  defined in its own gallery (GLY) file and referenced here
& N# o& d$ b4 x% Z8 |( I/ Z; e!  Example:' L0 c1 n- m# p9 k9 E
!    GALLERY customer_gallery.gly* @( d- Z; v9 u7 X4 h9 j
!
( C8 p% J- K7 }" y  S6 LBEGIN_GALLERY  CUSTOMER_GALLERY, T3 e! Z, [2 t% d' C6 g( }) L
COLUMN_IN_RIBBON 2
8 Z+ n9 n9 d( Z' ~# LCOLUMN_IN_POPUP 2
+ \  ~, W- F2 r4 M  d) j1 OLABEL Gallery
! t0 B; j4 L6 R4 @+ S# R; }GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT& R, r* e. p( G; t6 D/ M

, X6 o7 R0 f4 A! c0 z- S    BUTTON CUSTOMER_BUTTON_2
' _1 g$ Q" O3 a5 N/ K/ ]   
, ~, x! w- K: n( o    BUTTON CUSTOMER_BUTTON_3
' g+ }5 }+ e8 b5 _    # g5 e9 s, z. p! T( k7 M8 n6 H
    BUTTON CUSTOMER_BUTTON_4
2 e$ V$ o: L) e* X$ A* z9 l   
+ m. r0 o" r( ^* @; a    BUTTON CUSTOMER_BUTTON_5- d" z6 o; }; E) M/ O1 C
   
6 M1 M+ E( s& z! ?, j3 R( T% XEND_GALLERY, z+ m- X- D; \# o

" K4 W3 Y& H! ~1 K9 j+ @8 o
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了