PLM之家精品课程培训

PLM之家精品课程培训

联系电话:18301858168   |   QQ咨询:939801026
NX二次开发培训

NX二次开发培训

UFUN/NXOpen C++和实战案例

适合初级入门或想深入了解二次开发的工程师,本培训结合ufun,NXOpen C++,大量的实例及官方内部的开发技术。
公众号二维码

关注公众号

点击扫描二维码免费在线高清教程

课程详情
Catia二次开发培训

Catia二次开发培训

市场需求大,掌握核心技术前景广阔

Catia二次开发的市场需求大,人才稀缺。掌握开发技能潜力巨大,随着经验积累将在汽车、航空等领域有所作为。
B站二维码

在线原创B站视频

点击关注工业软件传道士主页

课程详情
Teamcenter培训

Teamcenter培训

全方位培训,从基础应用到高级开发全覆盖

涵盖用户应用基础培训、管理员基础培训、管理员高级培训及二次开发培训等全方位内容,由多年经验讲师打造。
QQ群二维码

加入同行交流

点击扫描二维码加入QQ群

课程详情
×

PLM之家plmhome公众号

课程涵盖: PLM之家所有原创视频

×

关注B站视频

所有高清视频一览无余,全部在线播放学习

×

加入PLM之家QQ群

同行交流,疑问解答,更多互助

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

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

[复制链接]

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

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

admin 楼主

2018-12-25 16:10:57

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

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

x
8 c" K; l/ G4 E  E. o6 n

8 ]/ {! M/ y6 j% A1 Q$ t5 F  Y$ e. X

3 E! _: Z( ~; {2 D. i; ], Q首先认识下关于菜单的后缀文件, h. g: C# [2 u0 K: o# I( i- f3 q

: a( ~6 k! f2 h/ P4 X; H( s
Extension
UI object
.tbr
Toolbar
.grb
Group
.gly
Gallery
.ddb
Drop-down
.rtb
Ribbon tab
.csb
Cascade
.abr
Attachment
: f" p) _! ?* u# f9 A/ |6 V
) Z" n7 N9 |: i& N% C
RTB作为菜单ribbon 界面定义的关键,详细信息如下
- `, @" `0 v& `2 e/ ~' y& T2 o; y9 z
& L, N7 R/ k( S/ L7 A! o
customer_ribbon_tab.rtb
1 b2 r! E/ b! ~% ~! s, N5 [!. A& u* k8 q! S+ b) K1 S- `; X9 H
!  Customer Ribbon Tab
+ \& X  K& N: P8 W( E) |! : S3 N. m4 s( Y- m- \
!  This file will create a new customer tab containing three groups and
/ m+ o6 I! k4 M* @( u!  one top level button.
1 z% D; j" i/ `0 e. H!5 V- L) P$ R/ T8 J0 r# }; t
$ t: h4 z" A# z) e8 X
TITLE  Customer Tab
. E8 x$ G9 b4 p1 H* o" n' [VERSION 170
: T) O" l' V9 O: k$ N+ i2 y6 a+ ^
!  The first group represents a Ribbon group that references an existing 8 W0 U3 l5 F+ K6 }
!  toolbar with no Ribbon style changes.  , p  ^) V0 ~% s2 L5 O
!
2 m- m) `$ _+ g, G  S!  This is the quickest way to add existing toolbar content into Ribbon mode.; ?. o; w& ]+ c5 U% Q0 a& g" J
!# a$ j" _' c% ]' v7 V" F. I" [
GROUP  customer_toolbar.tbr
3 C3 D4 q# ^$ a: L  v! y4 Z0 C
! 如果想直接切换tbr 到 rtb,这是最快的 1 x  o- P- C0 T$ g2 |8 N+ S* M
!  The second group represents a Ribbon group that references an existing
3 U6 e* \8 L& B- \7 H' [  [!  toolbar with Ribbon specific style changes added to it.  There is no difference
% N7 J! V  }5 g. i$ c1 |6 r!  in how this toolbar is referenced in the .rtb file compared to the first: A. _2 T# Y+ o: v* d
!  toolbar as a group.  The only differences from the first group exist within + P6 m6 z) g: L8 N+ u% B5 A8 [
!  the .tbr file itself.
3 f! C& J' G" G9 E8 M!0 K8 s, N. o0 \& A% w6 t0 F  G3 \: U
!  This approach has advantages for customers that will deploy both Ribbon and
( A  c, d5 ^) D) d!  Classic Mode customizations since all the content is defined in the .tbr $ J6 ^+ B. I8 G! G3 ~+ h
!  file and it will stay synchronized in both modes.  Only one set of customizations/ b, w1 z+ ]! i9 K7 K
!  will need to be maintained while still making use of RIBBON_STYLE to
* ?3 h/ D; Y5 m8 C4 ~: V!  control the presentation of the buttons on the Ribbon.
0 H4 _' }$ u; J, n# v!9 `$ I& T# y, V" \4 ]( R
GROUP  customer_toolbar_alternate.tbr  P1 G9 r) u( l' X7 i

+ v3 B% o: |) t7 o# y!  The third group represents a Ribbon group that has been created explicitly
( C, E1 B: x# ?/ T!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the4 u) w6 x% U5 Z
!  preferred option since the user will be able to take advantage of all the 6 r: E7 {- R. L1 j2 ~, X7 Y% P! u# c
!  layout styles and containers offered by the Ribbon.  ) [  P  v$ W8 |
!! ^" h" @0 }- ]8 l: j
!  For customers that will deploy both Ribbon and Classic Mode customizations,
% j6 V2 ]: C, O6 L3 ~! v4 U+ _!  this approach will result in no synchronization and two sets of customizations
5 [: f' l" N( z9 y$ q( ?7 b!  will need to be maintained.% s% d7 K8 N2 Q$ U1 b
!4 i, R0 f3 D2 @' o
!  A group can alternatively be defined directly inside the .rtb file by using the# r# p& v  j, i6 A4 ]/ z; v3 J1 A( L
!  keywords BEGIN_GROUP and END_GROUP.  
0 P) U: }3 u5 Y' l- S!
( G7 H! p, E2 _3 mGROUP  customer_group.grb
; N; l. r" a2 X( H0 p% Z, i% b- b5 z8 N. E1 O' L3 l
!  Example of a button that is placed directly on the Ribbon without being
2 \! W. s( b3 s" v!  contained in a group.  This is a simple way to add a button to a tab
$ S- Z, L& t) M4 _; |* W!  but is not recommended for many buttons since groups have advantages.
% G& b  R0 [' @+ y7 W!  
3 ?9 @* K6 s: j' n2 F6 O, f; ?!  A few advantages of groups:2 v, Z4 H* T# B
!     1. Easier to move many buttons around together in quick customization.  7 ?6 \& L1 {+ s- I$ ~& P! a" `
!        For example, MB3 on a group and choose "Add to Left Border Bar".  
3 l' R* i5 M) t* e7 Q!        This will move the whole group to a new location.  If buttons are
9 m+ j/ P& N4 N: I2 _  {!        not in a group, they need to be moved one at a time.
" f$ t- Y& _2 \6 \% b1 O!
5 E& r5 z" z6 V4 u0 U! T4 u" \* t!     2. Provide a label to describe its contents.# p4 l( Q1 w0 v; B
!
4 u! I+ Z  y/ i% {( GBUTTON CUSTOMER_BUTTON_1$ o/ @$ b3 t+ ^$ t. U1 Q! z5 A9 Q; c
LABEL Button1 Directly on Tab

3 J+ v3 z8 _& u
) y& c1 @) H  E9 V% v' v. I; r
部分菜单可以单独写成group gallery 作为对应后缀,重复调用0 N4 h2 C4 L/ u0 q- s( ]
!  Example of a gallery defined in a GRB file.5 o  k4 Y+ M1 U7 T% i0 ^/ p0 Z
!
! ]5 L# M4 r+ ~!  If this gallery is to be used in other places, then it could be % v/ B: b3 b- W
!  defined in its own gallery (GLY) file and referenced here
- w$ J5 f) |1 z!  Example:3 ?4 I! @8 `. r. h( d- ^/ S/ M( s
!    GALLERY customer_gallery.gly% |" t( D: V  y- v
!& T3 t4 {2 Q" e, k) m( {9 d
BEGIN_GALLERY  CUSTOMER_GALLERY" [7 ^! f6 U! y! N9 c; ]) `
COLUMN_IN_RIBBON 2
" b1 g% l& {. C. M9 uCOLUMN_IN_POPUP 2
% {+ J$ j. [9 W( t9 |& d% BLABEL Gallery
& t  @7 D! ^9 d6 yGALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
3 ?' V$ t$ I! y4 w. X0 v! U" p  J6 P, [1 L
    BUTTON CUSTOMER_BUTTON_2/ h( k; p  E: R6 O) g* O
    / q8 f- @' \) ~1 o1 k: G6 u% J1 I% g
    BUTTON CUSTOMER_BUTTON_39 a  b4 I1 V2 z* H* p9 o
    * x2 ^- S* P; _" o# {. T% K
    BUTTON CUSTOMER_BUTTON_4) G! u+ V+ d: F' w% {
   
4 N; S( a$ O3 S    BUTTON CUSTOMER_BUTTON_59 a1 l. ~$ I' ^
    3 a. h3 v+ Y# ^/ d7 M& R
END_GALLERY$ G  T' D: G4 A

  I: j, L+ {9 R# B
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了