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

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

admin 楼主

2018-12-25 16:10:57

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

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

x

. k+ Q& \: y# D' w, d. K- Q: z7 H' T. o0 S

8 t/ M6 h1 i7 g+ _- p# N2 j
! J. s/ ?8 Z2 n. V' ]3 q首先认识下关于菜单的后缀文件
0 g' G- s- K' s; |
6 Z* E: e1 y0 W2 \
Extension
UI object
.tbr
Toolbar
.grb
Group
.gly
Gallery
.ddb
Drop-down
.rtb
Ribbon tab
.csb
Cascade
.abr
Attachment

* s! T& N; \! s' t9 k. w% v6 p& F! y7 p  N1 _' U( f0 u8 p2 m
RTB作为菜单ribbon 界面定义的关键,详细信息如下
* R+ K6 O6 B7 ]4 e
0 |* L* u: u6 G& \# Z1 p. I- {+ U) i* u- a  E" Y
customer_ribbon_tab.rtb
3 P! ^4 ~2 @5 {4 T& C) S!( ~8 d) ^% h) u2 L6 @5 f8 Y
!  Customer Ribbon Tab/ C/ `+ c6 P  Z! ~+ w4 I
!
& z1 `. W3 m7 K- z! E!  This file will create a new customer tab containing three groups and& O* R# X4 t8 z! Q
!  one top level button.$ C' ?3 D$ o$ m  ^
!
" i, y0 P4 f3 o* m' y. x' f9 V6 d# s. g1 O6 j5 o
TITLE  Customer Tab$ E" |5 s+ ?! \/ I5 Z: z* y- H2 k
VERSION 170! i& f) ]6 ^2 y, H. i
4 O5 Z: o6 W) R4 H- y+ W/ k
!  The first group represents a Ribbon group that references an existing
* G1 Z3 G0 P8 R" j  k- n+ N!  toolbar with no Ribbon style changes.  8 A, I* n; v1 P3 b4 I9 N) t
!
; ?! E, w; q4 R7 ~% n4 |!  This is the quickest way to add existing toolbar content into Ribbon mode.6 r! A0 |/ z" G0 ?
!
# I, F+ l7 {, ~& m+ o+ N
GROUP  customer_toolbar.tbr; k# Q7 W) @  r* ?
! 如果想直接切换tbr 到 rtb,这是最快的 1 Q. p3 V) ?) [' I+ o
!  The second group represents a Ribbon group that references an existing
) b! m) c- {2 D7 Y5 j!  toolbar with Ribbon specific style changes added to it.  There is no difference* X/ N, x) l: F+ [, `" r
!  in how this toolbar is referenced in the .rtb file compared to the first+ }% r6 G9 m3 P; s, C7 f
!  toolbar as a group.  The only differences from the first group exist within : ?$ j5 Z! V, G2 d
!  the .tbr file itself.
5 D* @: n* a& q# g% H; e!
5 ?+ c- N6 P. A/ [!  This approach has advantages for customers that will deploy both Ribbon and/ r9 V4 Y. J7 l
!  Classic Mode customizations since all the content is defined in the .tbr + \* D- `4 V/ [2 @3 h
!  file and it will stay synchronized in both modes.  Only one set of customizations0 Y3 P! z7 J' G4 J+ n( M6 `
!  will need to be maintained while still making use of RIBBON_STYLE to
6 m" b* Z6 {/ z6 V- C!  control the presentation of the buttons on the Ribbon.
, x1 f% G8 h( Y3 M  r( k!. }$ n6 U- z- I" c4 s+ j- }
GROUP  customer_toolbar_alternate.tbr, ~1 J; x+ g& m! ^
5 N) |4 j" x$ r  U2 c" a& u
!  The third group represents a Ribbon group that has been created explicitly
. I! k5 \0 Y9 s  G$ u! o4 u!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the: ]- i; d! L; ]/ S# c
!  preferred option since the user will be able to take advantage of all the , D: e: [1 C% K; a# w7 z( t
!  layout styles and containers offered by the Ribbon.  
, m* d; J& F4 _2 ~4 f) ]!
  O5 W5 \" t: v& E) k!  For customers that will deploy both Ribbon and Classic Mode customizations, 7 }: Q7 o9 i  _) l" c& W5 j
!  this approach will result in no synchronization and two sets of customizations * a8 r; e* t( q0 Q, e! t
!  will need to be maintained.: F- ~5 _* S1 N8 {. f5 ^- R
!9 J: O" }# \3 T- P% n
!  A group can alternatively be defined directly inside the .rtb file by using the* p4 K3 v% q0 F" t$ X6 b4 B7 Q
!  keywords BEGIN_GROUP and END_GROUP.  , f+ K2 D, K# o; a7 U2 \( B$ J
!6 H4 c2 ^: i' y/ a" Z
GROUP  customer_group.grb' T# f: h$ u5 V9 L+ q3 W
9 i$ l% @+ {* H8 C
!  Example of a button that is placed directly on the Ribbon without being. @0 k: m! Q* F5 n0 V
!  contained in a group.  This is a simple way to add a button to a tab
5 W: d+ o8 }  t* [7 J3 p!  but is not recommended for many buttons since groups have advantages.9 b2 ~+ E2 e7 v; g+ z) K
!  
) C  v- x7 g/ @+ q!  A few advantages of groups:, H! H$ A  Q2 D% g) n7 n( _/ L
!     1. Easier to move many buttons around together in quick customization.  + O5 U# y8 h1 @" Y  `  P& M5 v
!        For example, MB3 on a group and choose "Add to Left Border Bar".  
. d0 {( b+ F9 V; d! N!        This will move the whole group to a new location.  If buttons are $ g' `; ?1 B! e1 v
!        not in a group, they need to be moved one at a time.
! A" s2 T6 Y+ q0 r  v!
1 B8 H- L- `8 ]!     2. Provide a label to describe its contents.
$ ]3 Q+ P3 W4 r2 U0 k!
3 I' [) ]+ N+ N4 CBUTTON CUSTOMER_BUTTON_1
! H1 a& ^8 I- p+ k$ q( nLABEL Button1 Directly on Tab
5 [2 D- u& w3 p3 Z, n: l
9 o8 T# L" J* F
部分菜单可以单独写成group gallery 作为对应后缀,重复调用
6 d3 S1 z7 C* h' u  ?. n; |!  Example of a gallery defined in a GRB file.; e) p  i  U. d4 @0 m
!
  m: e8 ~& f5 K, q( X5 k5 p!  If this gallery is to be used in other places, then it could be : E4 w4 |& r. T: W6 q$ d. R, d$ w
!  defined in its own gallery (GLY) file and referenced here
* ?! P  o9 @9 u! |; ^1 d!  Example:+ [/ }1 ^" E9 J: ~$ K% v% [; ]
!    GALLERY customer_gallery.gly
& p/ O! ^- O+ m# U) |1 l!' k9 J" ~3 T. B8 U* C1 L# [
BEGIN_GALLERY  CUSTOMER_GALLERY7 y( S* \5 Q2 c+ D, e8 m, \4 K, I# _
COLUMN_IN_RIBBON 2
9 E$ B& \, B8 g" ACOLUMN_IN_POPUP 27 f5 i3 w6 l. z3 V0 {1 ~
LABEL Gallery
1 b& t2 w$ o3 T: S2 [GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
: `% T% {( @) d1 ^
0 q; u, O# ]7 t    BUTTON CUSTOMER_BUTTON_2
- P$ s  }2 c. o7 _   
  N/ F4 F$ l+ u, B    BUTTON CUSTOMER_BUTTON_3
# J1 c7 ?+ [/ G   
, v3 T7 Y3 g2 T8 Z# z4 Y% W! q    BUTTON CUSTOMER_BUTTON_48 g. K% ^0 E# V1 ?6 B- B
   
$ H" U- v; W! I0 m% }    BUTTON CUSTOMER_BUTTON_5
( {, t( z/ y7 o& v    0 M. r: E& e, v" M1 O' K7 \8 g7 }
END_GALLERY
! p; u! T8 o% Q

0 N8 u- d4 `8 F
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了