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

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

admin 楼主

2018-12-25 16:10:57

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

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

x
( R/ ]3 L0 r+ y# t0 {
# n3 M5 }9 C) J8 }( y, }

! w* t" b: b# _" z; a! J+ `7 p  [; H0 Z% [2 n8 T
首先认识下关于菜单的后缀文件8 G) [  w9 y1 o, V( E

0 L% f4 t6 A/ f* G; S
Extension
UI object
.tbr
Toolbar
.grb
Group
.gly
Gallery
.ddb
Drop-down
.rtb
Ribbon tab
.csb
Cascade
.abr
Attachment
: `: }+ i  K: }2 ?7 P
3 F" O+ B6 ?7 T8 K
RTB作为菜单ribbon 界面定义的关键,详细信息如下: H+ U$ g5 s+ @7 Q( `7 v. ], ?

. p( ^1 ^4 l5 e# W! M* J8 m3 D6 z9 \
+ i( o* Y% e8 @2 O* ]9 e0 jcustomer_ribbon_tab.rtb
  T% e" r' C# A3 c4 I/ h+ c!! W9 O! N+ K0 Y: G  u4 t0 j
!  Customer Ribbon Tab
7 z" e8 V, |, t" X! # e+ [( I  X& \
!  This file will create a new customer tab containing three groups and; t6 J8 H: O* }$ Q( F
!  one top level button.+ d1 }7 E% A" x# ?; i6 A3 u
!0 b& B- L8 {' G7 A
; L" U$ F! g7 M& s9 O. V
TITLE  Customer Tab/ p0 _1 u1 O& K" Y( l) A
VERSION 170
( c% I: A) P; @+ i7 P* j& r& ]/ R
!  The first group represents a Ribbon group that references an existing
& p( B2 q# y$ ~$ f!  toolbar with no Ribbon style changes.  % R4 g6 r' \3 Z; P5 U
!
' X. B5 Y0 K0 Y  Q/ W) u2 e7 D: i! ~!  This is the quickest way to add existing toolbar content into Ribbon mode.3 Z, C; a/ P: H  r8 ]) N* Y
!
& X% j7 v" t" ~) W6 U3 I: P- M
GROUP  customer_toolbar.tbr
, y+ G. d2 G* d
! 如果想直接切换tbr 到 rtb,这是最快的
' T! a2 _6 I) e7 b5 J!  The second group represents a Ribbon group that references an existing 2 b2 k3 Y7 d. ?& T' s) n
!  toolbar with Ribbon specific style changes added to it.  There is no difference- l1 u$ F/ P: W6 W& k0 C+ I
!  in how this toolbar is referenced in the .rtb file compared to the first
4 O/ E' r4 Q+ c. I9 `# E$ w!  toolbar as a group.  The only differences from the first group exist within
" l. j5 C2 Q" ?3 o" ^% u!  the .tbr file itself.
2 V3 H0 ?' J) F7 ]- R!6 ?7 i: V) h; v0 G1 @; M* y1 f% X
!  This approach has advantages for customers that will deploy both Ribbon and* J+ f! o0 J9 {
!  Classic Mode customizations since all the content is defined in the .tbr
3 A+ ?! ]. C* Z# [!  file and it will stay synchronized in both modes.  Only one set of customizations
+ \3 h$ x2 F/ y: e* Q!  will need to be maintained while still making use of RIBBON_STYLE to 8 k7 M5 e9 F  \8 }! I" ~0 L
!  control the presentation of the buttons on the Ribbon.% C, [; y9 d$ P: q
!. w; i7 C) V# B  Q* [' \* M
GROUP  customer_toolbar_alternate.tbr2 Z. p; u# @: v8 S- d
- ?! W: c; X, ?* R5 q
!  The third group represents a Ribbon group that has been created explicitly
" q5 s' ^7 U3 g: D4 q* T/ Z!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the
5 i& f/ N' i: M: s9 [# Y4 c8 c5 c* D!  preferred option since the user will be able to take advantage of all the
- o1 r+ I/ P1 k% y9 x/ `!  layout styles and containers offered by the Ribbon.  
' n3 r3 a6 S1 h7 l- f!1 Y& E9 [- e# K/ Y2 E
!  For customers that will deploy both Ribbon and Classic Mode customizations,
/ e- p9 i8 Q0 w1 O6 x!  this approach will result in no synchronization and two sets of customizations
  s, {# O8 d: d  o8 i!  will need to be maintained.4 m; k9 Z1 s; E5 c" ~- [: M1 X$ n
!
: `6 x* J5 w7 g- t: L!  A group can alternatively be defined directly inside the .rtb file by using the/ l$ m6 `& n& G6 S$ M( V8 u5 _
!  keywords BEGIN_GROUP and END_GROUP.  
* o& X  f4 @  B) P- c6 Z* k' m!
3 d1 d+ K( M. L6 ~! ]! l- |GROUP  customer_group.grb
" M) a" G# ?( {* |3 ~
3 ?# t' U& W3 j$ t! M!  Example of a button that is placed directly on the Ribbon without being
" N) f4 |4 V4 F7 U8 Q!  contained in a group.  This is a simple way to add a button to a tab% M/ q: ?8 F5 I) c( @$ @
!  but is not recommended for many buttons since groups have advantages.
) @4 o/ f& V. t! k' J! u!  
9 Q# R2 o2 U2 q3 S  s$ Y  q, K- w/ J4 D!  A few advantages of groups:
! l" V5 U, h1 J1 a, m!     1. Easier to move many buttons around together in quick customization.  . [( q5 @" ^% G" F1 M
!        For example, MB3 on a group and choose "Add to Left Border Bar".  6 @' [0 y' e6 h  @  R0 X# N9 [
!        This will move the whole group to a new location.  If buttons are
/ X! g: D+ s" o) d& e; t& r4 a  P!        not in a group, they need to be moved one at a time.
3 j+ v) \6 z3 ^# O: O% E!& V! r8 e2 I7 {; o
!     2. Provide a label to describe its contents.5 C6 {' U; r6 p' V/ \# m/ }3 `4 x& x
!  Q" ?  b( T& _5 ~/ {# N. |+ T
BUTTON CUSTOMER_BUTTON_1
; T( x0 `3 L* x, z" p1 g; xLABEL Button1 Directly on Tab
  u; Q9 P, d9 R2 P. G! q% j

& K+ q' s$ F0 y
部分菜单可以单独写成group gallery 作为对应后缀,重复调用8 n: L: V/ o' h- p" w. Q% I. u
!  Example of a gallery defined in a GRB file.
4 P5 x+ y6 }8 q: d!
6 J3 m+ M9 k1 O# Z4 n7 [!  If this gallery is to be used in other places, then it could be 3 Y2 S+ A% e7 i* l) L& W5 q4 b
!  defined in its own gallery (GLY) file and referenced here
2 c5 i& _  t6 H# `. v!  Example:
; g  Z/ H, ~9 C; ~!    GALLERY customer_gallery.gly
& V0 Q/ i9 Y8 K+ w2 m: P9 W!
+ }' f, j! m5 H0 D0 d) A* R/ V" cBEGIN_GALLERY  CUSTOMER_GALLERY! F$ i  ?6 w$ S* q* B
COLUMN_IN_RIBBON 25 c8 p! [( V7 t( B
COLUMN_IN_POPUP 2
! Z8 M4 A7 s$ D! J1 ^+ gLABEL Gallery
% G, w' v, y( ^6 [+ c6 R0 J, MGALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
% H4 E/ v( o/ b$ _: W
8 l4 u1 q# f2 R) f5 f1 o( s9 B    BUTTON CUSTOMER_BUTTON_23 Y/ I0 a7 P0 N
    $ k/ r5 c' g; v0 G+ n% B
    BUTTON CUSTOMER_BUTTON_3
' {+ g/ A$ c$ ^+ `+ {# @( I   
; f( ~* X) M  v; ~4 b' p" x* Y8 h8 B    BUTTON CUSTOMER_BUTTON_4
+ b0 U  i& h4 z& Q* E    " W) w+ e8 X; a, n0 C5 t" [& u
    BUTTON CUSTOMER_BUTTON_5
5 i" z; ^0 s. c4 j6 o4 S( A; |   
* u5 p$ Q) p' N/ SEND_GALLERY$ q* T1 M6 ]8 _) f

" v5 U9 w6 \" V1 n
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了