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

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

admin 楼主

2018-12-25 16:10:57

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

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

x
6 }8 O& i+ u. l1 Y1 z
8 w8 s$ C( P& z9 X6 Z
! o/ Y/ ]1 v1 B: L

0 r3 @( u+ v2 H& T, s+ G首先认识下关于菜单的后缀文件
- K4 H6 _5 K' \! g2 W/ K% i9 q- J
4 D" S4 B: O; i8 `6 B# [& v
Extension
UI object
.tbr
Toolbar
.grb
Group
.gly
Gallery
.ddb
Drop-down
.rtb
Ribbon tab
.csb
Cascade
.abr
Attachment

" `7 s# X% {/ X( i
. d; w; F- _# x4 ^2 BRTB作为菜单ribbon 界面定义的关键,详细信息如下
) D+ _: X0 G7 l; D6 l' }+ s: g# g0 z/ A( q* f* \: d0 {
# V7 |1 C' v( h0 w  A
customer_ribbon_tab.rtb
9 r0 v& m" T! d* Q!
( y: T' t; i: x, C0 J0 N!  Customer Ribbon Tab8 U( ^. g5 E5 T! ]
!
1 N" B1 P3 I& R0 L!  This file will create a new customer tab containing three groups and3 F1 R1 L2 t! j' L) O
!  one top level button.4 s; u; y' `- a! z2 F
!6 F2 n, g/ j* I

0 ~+ l& r) r+ d9 ITITLE  Customer Tab
! @% t9 u8 E9 `& ^' VVERSION 170
* t* X$ ~- V  J; C! G& T2 g) |' K6 v. K; h; d9 Q# J8 b
!  The first group represents a Ribbon group that references an existing & A: p3 {8 @* r; V2 h8 C
!  toolbar with no Ribbon style changes.  
8 s% L7 l( ~8 T$ P, C9 u! O0 H!
  r, ?9 A* c7 ?. F8 O9 c  w& ?!  This is the quickest way to add existing toolbar content into Ribbon mode.1 N$ s  f# U& s7 n  y) g" x+ c
!0 F7 Z) ^" n! v! v
GROUP  customer_toolbar.tbr
. p4 h& e) I6 {9 c& {1 ?
! 如果想直接切换tbr 到 rtb,这是最快的 + p- ~. o% y5 T) Z4 m( v. R5 v
!  The second group represents a Ribbon group that references an existing
/ B$ ^2 f. O* }( V# P!  toolbar with Ribbon specific style changes added to it.  There is no difference
& j% D/ h6 m& `4 M!  in how this toolbar is referenced in the .rtb file compared to the first
3 g' E3 X% n  q) M  {4 Z+ ~/ P!  toolbar as a group.  The only differences from the first group exist within : O& M2 F4 a6 s* X) b7 P
!  the .tbr file itself.3 E- T! M. K8 p: m
!- A: c8 T7 p! ]0 W
!  This approach has advantages for customers that will deploy both Ribbon and' F' w% G& u0 ?
!  Classic Mode customizations since all the content is defined in the .tbr ) B0 T( Y6 |  j
!  file and it will stay synchronized in both modes.  Only one set of customizations- |5 m' Z" Z5 e
!  will need to be maintained while still making use of RIBBON_STYLE to
6 Q$ y- t0 w- K/ g. Z- c  T4 H- ~+ D!  control the presentation of the buttons on the Ribbon.2 I: E& `: M* |# I8 b% i
!1 B; f7 u0 T, i: d" A3 u% u
GROUP  customer_toolbar_alternate.tbr) K7 C) u- ~& \- h
! J, ?9 z: }7 c! J- p" o: s
!  The third group represents a Ribbon group that has been created explicitly$ Z0 I! s6 A" d
!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the
  A; n; U* ?" s% f) S6 A!  preferred option since the user will be able to take advantage of all the
/ Z7 E+ V5 q- a!  layout styles and containers offered by the Ribbon.  ; ]3 m9 Q8 v8 G8 k8 i
!
5 Z9 c! D/ H' l) Z. f+ ?1 M% \!  For customers that will deploy both Ribbon and Classic Mode customizations,
/ H) e; ?& _2 u, O9 }7 M0 p!  this approach will result in no synchronization and two sets of customizations / s! W) I+ {. _' y- F
!  will need to be maintained.
) Q' h+ e; i/ D6 F# |!% E; _3 m# N! y+ \& Z% W
!  A group can alternatively be defined directly inside the .rtb file by using the2 W/ D: r# z6 f' s9 _( d
!  keywords BEGIN_GROUP and END_GROUP.  
, x( o( i0 i* j0 v" C# p!
& ?. T0 }7 _: \2 dGROUP  customer_group.grb- N' e% P( z& j9 ?: d$ J" q1 [
! m* W, o. D- o  j, l1 B3 k
!  Example of a button that is placed directly on the Ribbon without being
8 N* q1 ~5 k6 V7 {7 w/ L!  contained in a group.  This is a simple way to add a button to a tab/ q% V: t  C* B3 B
!  but is not recommended for many buttons since groups have advantages.8 T( |% e/ K3 Z. C  E
!  
0 X; {: e  Q3 N% L  j0 S; j!  A few advantages of groups:" K+ \6 n9 y+ T
!     1. Easier to move many buttons around together in quick customization.  
* B6 E3 Q6 {  \6 U- ~: a!        For example, MB3 on a group and choose "Add to Left Border Bar".  ; F# n) C+ a! z0 ?4 ^
!        This will move the whole group to a new location.  If buttons are
3 E. E& e0 {: H!        not in a group, they need to be moved one at a time.$ m' f& W' q% U+ U' L
!& i/ c) d; ^- `; v5 S" `
!     2. Provide a label to describe its contents.
6 e" X3 c$ y2 Y  t!+ E! b/ q, i$ T3 @. O
BUTTON CUSTOMER_BUTTON_12 f0 y5 ?1 `# Z
LABEL Button1 Directly on Tab
/ o8 O) B, c- a% n* l
0 y- x9 I3 G9 ]  @
部分菜单可以单独写成group gallery 作为对应后缀,重复调用) a1 f  @+ ]8 p
!  Example of a gallery defined in a GRB file.4 K* [! ^' [5 A8 R, N6 I
! , E1 p5 }2 C& |" a6 z
!  If this gallery is to be used in other places, then it could be / D" }  q( M# J2 y% \; S6 E! l
!  defined in its own gallery (GLY) file and referenced here
+ S+ W9 [5 s4 Z# ^( G!  Example:
+ t+ }2 W: j4 j& {!    GALLERY customer_gallery.gly- ^! B0 h) }  `6 P! Z/ w
!
% |" `; s# |3 ]3 h. O  KBEGIN_GALLERY  CUSTOMER_GALLERY
5 S" H  N: F  DCOLUMN_IN_RIBBON 2
* {4 ]  C* w6 O" D$ G3 nCOLUMN_IN_POPUP 2! w* a; m7 H6 t+ b% H6 j% y0 `/ \
LABEL Gallery7 R6 r  O0 ]9 k7 D
GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
/ H+ l1 m( M' _2 O5 ^) l* Z- V3 m. C$ w9 J0 @
    BUTTON CUSTOMER_BUTTON_2
5 R- k! W& k# F5 M6 H5 m    / y7 p! r" N3 q& k
    BUTTON CUSTOMER_BUTTON_3
  N, a+ O; [; D: L" D' L   
! i% }4 E  [6 b    BUTTON CUSTOMER_BUTTON_4
0 C. {5 v$ p: Y# F' e   
9 N  D4 U) z5 t  N6 |. k! U    BUTTON CUSTOMER_BUTTON_59 o! I9 r0 P) w+ D4 |9 t5 T& k9 @
   
" n( Z1 V5 r6 `8 CEND_GALLERY3 A) T8 g. J3 s9 F: A' T
: x% s1 o) D* [1 E! W; S
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了