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

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

admin 楼主

2018-12-25 16:10:57

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

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

x
4 g! |: D7 x; }, q5 v

# w0 a4 v1 @" M) B/ y8 b( @
0 B7 ?3 [2 M$ p8 {7 }0 h7 \$ @; d4 A3 c# k* u2 C
首先认识下关于菜单的后缀文件
/ O. f( A6 ^* b! z
8 u; B8 o5 k5 S, _$ H6 U- B; k
Extension
UI object
.tbr
Toolbar
.grb
Group
.gly
Gallery
.ddb
Drop-down
.rtb
Ribbon tab
.csb
Cascade
.abr
Attachment
4 \/ i. l4 M9 @0 G+ ~/ J
0 n! h9 ~9 b, \5 g$ Q- w2 g& p6 @( J
RTB作为菜单ribbon 界面定义的关键,详细信息如下
7 b# `* D7 e8 A8 U1 |3 k
8 r, ?& @# w% ~4 ^2 L! ?6 i. X" m- C8 @. I
customer_ribbon_tab.rtb, j6 f- e" |' m; e
!
4 |+ C  r7 i3 r! ]!  Customer Ribbon Tab3 M7 B+ s8 I' O$ z; `9 i6 _
! 1 o" T' X% _( j. z
!  This file will create a new customer tab containing three groups and" i: s8 f2 _4 p: e* A/ S4 B. O
!  one top level button.9 [6 i! [" U$ p% D# F
!
: O9 M9 \4 Q+ u+ |- l& L) K( U" f- r
TITLE  Customer Tab
/ P* W/ a% o& u5 V- ?/ \! I  K3 uVERSION 170
5 E' X( p" S& ^& C$ h
5 z: _6 R& A- _, g; h/ H!  The first group represents a Ribbon group that references an existing " V: W, Y8 d  R" A' g
!  toolbar with no Ribbon style changes.  ! X3 r% U) i" B2 k" Q" F/ A7 t2 k
!
, g4 w: ^! w) n4 D' k* U( H!  This is the quickest way to add existing toolbar content into Ribbon mode.( j. ?/ g1 G; }/ V. b* x
!; r8 u$ o$ u. D+ S& U$ _" I1 E
GROUP  customer_toolbar.tbr
8 B2 B. I! k# I* U( \+ ?  a! k( |
! 如果想直接切换tbr 到 rtb,这是最快的
) [, T2 {1 O& J6 }/ d9 l!  The second group represents a Ribbon group that references an existing
3 O- X8 L; L! I, c* ]!  toolbar with Ribbon specific style changes added to it.  There is no difference
( o2 ?" O" x: B$ U!  in how this toolbar is referenced in the .rtb file compared to the first
  Q! }3 s. i& o!  toolbar as a group.  The only differences from the first group exist within
8 f& o" }" P# B( s+ w. o$ \( j2 E9 t# x!  the .tbr file itself.
# V  O& L: j1 \* ~5 P5 a!
! Z# X" P$ C- L5 [+ k!  This approach has advantages for customers that will deploy both Ribbon and
. V" w. q9 k7 b  c!  Classic Mode customizations since all the content is defined in the .tbr
5 k1 X% k7 T& \! E9 W7 Y!  file and it will stay synchronized in both modes.  Only one set of customizations
7 \, q( |9 j. \3 Z!  will need to be maintained while still making use of RIBBON_STYLE to
' K1 F) g2 a# z" l0 [' c/ [!  control the presentation of the buttons on the Ribbon.( ^' C- n! q8 M& i0 x, l
!% e; ^& A$ x, q
GROUP  customer_toolbar_alternate.tbr
' D- l7 g$ [* s9 f- A
$ z3 e8 j% f6 a, N% [!  The third group represents a Ribbon group that has been created explicitly* `8 m. w% ~% e" m6 `: i
!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the) c) A* D6 y1 @0 B' H6 J# w" I* N; ^
!  preferred option since the user will be able to take advantage of all the . Q1 F- u( ?1 y9 I1 X- s
!  layout styles and containers offered by the Ribbon.  8 ~8 \5 u& u. k# j- U% p
!
! L2 c9 G$ w' D, ~5 ]!  For customers that will deploy both Ribbon and Classic Mode customizations,
0 {. V8 a: r  _1 v+ @!  this approach will result in no synchronization and two sets of customizations
  z8 D7 [6 p& r- E4 P5 j!  will need to be maintained.2 _* ~4 l$ ^2 }8 W9 R
!
% N/ d$ `8 [0 P# g8 s5 s!  A group can alternatively be defined directly inside the .rtb file by using the
/ \- ^9 J# ~$ `# e; \# C: u0 B!  keywords BEGIN_GROUP and END_GROUP.  
8 `/ U1 \* J0 f( j0 h!- ^) |, j, ^% f( ?- a
GROUP  customer_group.grb7 S) Z; T) e+ Q

( N) H& [5 X4 D* a; _) r!  Example of a button that is placed directly on the Ribbon without being
8 z$ r3 L7 ]' |3 A" J+ |!  contained in a group.  This is a simple way to add a button to a tab
. j" r# b. E) h, U!  but is not recommended for many buttons since groups have advantages.
# W4 y6 a/ i9 V3 X% u!  6 a5 h/ w/ u4 G, f3 n
!  A few advantages of groups:
* z' z% Y, W* M: s3 O' d! z- z!     1. Easier to move many buttons around together in quick customization.  
! Q* t$ T( R+ Q! c" M; N!        For example, MB3 on a group and choose "Add to Left Border Bar".  % d- I1 B- S+ D% @
!        This will move the whole group to a new location.  If buttons are 5 V/ @5 ?, U' d9 ^
!        not in a group, they need to be moved one at a time.7 c" }& e+ E* N& b1 X2 g5 j
!- m3 ^( R- m* R$ p: H5 y. }
!     2. Provide a label to describe its contents.
( M  R5 A# x0 Z- q  J$ }!; t' T3 `+ B( `( q: {% V9 r
BUTTON CUSTOMER_BUTTON_1
9 w8 ?$ s3 ?  U- \! x; G9 rLABEL Button1 Directly on Tab

5 ~7 j9 I- t0 T' d5 r8 e

  e/ r+ x2 j( M$ {
部分菜单可以单独写成group gallery 作为对应后缀,重复调用, t2 B4 M& @- a3 {- e
!  Example of a gallery defined in a GRB file.
$ }% ]: ~/ ?8 m% r5 v! ) T) L, r. \6 q! j
!  If this gallery is to be used in other places, then it could be 0 I/ C& S0 u# i2 ^. H' P
!  defined in its own gallery (GLY) file and referenced here
* H: ?1 w" J" Q. M3 D!  Example:8 ~3 d% D) Q. X0 I0 S, C: Z+ A
!    GALLERY customer_gallery.gly
4 q% d$ s3 L; z$ e!4 k: }7 v0 z  p2 F
BEGIN_GALLERY  CUSTOMER_GALLERY- m2 m7 v) ?1 K% R1 n! [
COLUMN_IN_RIBBON 2
/ I0 _) f; x+ k" m6 X& c+ }2 X# NCOLUMN_IN_POPUP 2& c6 t9 z) M+ w& d& g
LABEL Gallery7 h# s) U$ h0 `/ a
GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
9 l6 z  G0 N) I, l# H' {( G3 d' |, B8 d& L4 p2 y6 s
    BUTTON CUSTOMER_BUTTON_29 v' w; v4 D) K, T  |( ?) k
      U- g8 k* G; X' \6 ~6 u7 B7 y. B
    BUTTON CUSTOMER_BUTTON_3' g3 o2 ~5 S$ i7 z0 Y" Y
   
% s: G+ E( Z) D# t7 T7 U* A    BUTTON CUSTOMER_BUTTON_4
8 _7 i: J! Y# L' y2 Z   
$ i2 W! b1 o# V9 O% X( ?    BUTTON CUSTOMER_BUTTON_5
8 w) R$ `6 z0 h* l% H' w- a& A    4 Y. _! S7 }8 e3 I& m; o; a$ \/ Q: }
END_GALLERY
" R& L, a. y5 M) d$ R' |1 T
/ F/ O, r( \- j3 i4 v% {1 y
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了