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

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

admin 楼主

2018-12-25 16:10:57

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

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

x

& x8 t7 `- T+ u  y! z% P5 G6 }9 r; W0 F- {+ w
# {/ L: h! a& F. m8 b1 |+ ~0 s
9 `6 x; l/ \7 D8 K$ V
首先认识下关于菜单的后缀文件
" I1 y5 p3 ^$ ~( U6 Y* m" \: d! M/ y  N5 A& G; L6 I/ O
Extension
UI object
.tbr
Toolbar
.grb
Group
.gly
Gallery
.ddb
Drop-down
.rtb
Ribbon tab
.csb
Cascade
.abr
Attachment

$ V7 H' H% g- K/ i  k* S) Y7 f9 N' F4 a
RTB作为菜单ribbon 界面定义的关键,详细信息如下
& e. s! v5 i$ d  h7 R
' z3 G) |0 {, g; @7 l5 E! w
3 w$ [1 g; K. ]! j, Lcustomer_ribbon_tab.rtb
  d* d! E6 m5 @6 J!
' D- o: B" H/ D. ]* Z!  Customer Ribbon Tab
# Q6 ?7 ?/ [( X3 R) _; q!
1 u9 q& \5 k% A! o2 y!  This file will create a new customer tab containing three groups and9 z+ l, @/ q; W7 Z/ O, i
!  one top level button.
, P5 k% S) Q9 D!
; d7 z' ~) S0 G3 L" U' y  G, O8 u+ Z1 B* O5 P
TITLE  Customer Tab
' S4 S. F0 {% U, aVERSION 170
- U/ q2 Z: b$ S" Y$ U8 g, ~. ?) Q6 j* L. ]% |" e' K( t2 K
!  The first group represents a Ribbon group that references an existing
, ?, l" Q) K" a( Q!  toolbar with no Ribbon style changes.  
7 ~' J$ s; z! l9 W! + W" Y% R+ b" g5 N- [
!  This is the quickest way to add existing toolbar content into Ribbon mode.
+ A' u7 X* g  w, C$ o' i, f% R1 H' o!9 `/ h& {) |4 `
GROUP  customer_toolbar.tbr7 C7 x8 n, A; c9 v
! 如果想直接切换tbr 到 rtb,这是最快的
) `+ I4 d3 T/ r!  The second group represents a Ribbon group that references an existing : s7 O( I5 i% U  `9 r9 ^
!  toolbar with Ribbon specific style changes added to it.  There is no difference
* _, B( P6 t0 ?$ m3 h- J!  in how this toolbar is referenced in the .rtb file compared to the first
  {$ Q0 x2 R& @5 f' k!  toolbar as a group.  The only differences from the first group exist within 2 @* p' j1 A/ m1 u1 Q2 t
!  the .tbr file itself.( @# y0 a/ h( F) q! |$ @* B
!
$ \1 \4 b, [9 c( [) |5 G!  This approach has advantages for customers that will deploy both Ribbon and& u2 _$ v! E5 W- X/ Y
!  Classic Mode customizations since all the content is defined in the .tbr # b7 J- L* e$ V7 s$ e( r! @
!  file and it will stay synchronized in both modes.  Only one set of customizations+ }. N: A6 d: i; }! z; q
!  will need to be maintained while still making use of RIBBON_STYLE to
, }9 {3 F, [2 v* \7 Q" U+ B!  control the presentation of the buttons on the Ribbon.
+ E$ ^: r) l% o" S0 |!
# N7 v5 I( ^+ {GROUP  customer_toolbar_alternate.tbr
% {! E5 w# h2 N# \% ` 6 h0 L: l4 B8 V
!  The third group represents a Ribbon group that has been created explicitly6 v0 h, F& E$ {' F$ q! f
!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the2 u0 d- r4 K) \0 X8 E4 k: _! M9 @
!  preferred option since the user will be able to take advantage of all the
" Q" Y2 p8 P) `7 w, y2 A6 m!  layout styles and containers offered by the Ribbon.  
% l8 [7 p! |5 {4 b! j) D. U!0 {; d3 D" e3 V* Z+ C6 z
!  For customers that will deploy both Ribbon and Classic Mode customizations, 6 B  I: Q8 r0 j  e9 y
!  this approach will result in no synchronization and two sets of customizations
# s) f* @* S' |8 j, ]2 E!  will need to be maintained.' C( m( y% m- |, u; U" l
!& A. g. |' n7 F
!  A group can alternatively be defined directly inside the .rtb file by using the
) W. B. P6 w9 J1 `1 i8 o!  keywords BEGIN_GROUP and END_GROUP.  
8 R. u! t/ Y& m!' M" T" M: U& f& \  |/ H1 X
GROUP  customer_group.grb8 L8 G2 }* e* |2 o) v( y0 D
# s4 [2 S  A" d8 A/ d. S" N- ]
!  Example of a button that is placed directly on the Ribbon without being
4 k% K$ r  _. E  [% `0 C" g!  contained in a group.  This is a simple way to add a button to a tab; Y& n/ i% H0 t+ D2 w
!  but is not recommended for many buttons since groups have advantages.! \! T0 z, {2 R5 O% y; m# p
!  ! u# @  e3 }4 }, c( w! R# A1 {
!  A few advantages of groups:$ @! i, i4 e& p: [+ Z5 M
!     1. Easier to move many buttons around together in quick customization.  1 N2 D+ c5 `+ D. s  s; ?, t
!        For example, MB3 on a group and choose "Add to Left Border Bar".  ! j/ b- b9 e# U, ^3 m; p
!        This will move the whole group to a new location.  If buttons are
5 f- o" H9 f/ j% i- l6 p!        not in a group, they need to be moved one at a time.+ w6 D& c) d/ I! ?- z* v& B" o$ u2 k
!
  b" c/ i' h, p- G9 L!     2. Provide a label to describe its contents.
; _% @# [0 i& {: f!# m1 x1 e% z0 U3 a
BUTTON CUSTOMER_BUTTON_1
$ x4 e9 _0 F( T5 ]4 zLABEL Button1 Directly on Tab
. _* [6 L) S' f" J) j- q

* K( A' z! R- r. O/ y
部分菜单可以单独写成group gallery 作为对应后缀,重复调用6 G- o( w% ?) m8 i* j
!  Example of a gallery defined in a GRB file.  S1 M) k! Z# X) L" i2 J
! 5 }! R8 D3 Q0 y
!  If this gallery is to be used in other places, then it could be , D5 \' Q0 j7 M9 h6 D
!  defined in its own gallery (GLY) file and referenced here* U( C# B4 o- r1 t/ J
!  Example:
/ o) E' h5 t0 W& y4 q!    GALLERY customer_gallery.gly5 W. I  G2 n9 L/ V0 r% I
!. u2 j+ d  a" j6 z2 n$ G
BEGIN_GALLERY  CUSTOMER_GALLERY
  v2 v1 \. ~% _, F# zCOLUMN_IN_RIBBON 2
# u4 x1 Y' ]5 H# A( F) ?COLUMN_IN_POPUP 2
0 f. @# C& Z1 p2 DLABEL Gallery% `6 Z% x' V6 o, N* Y" j
GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT
1 O2 [+ Y+ n% d! k. u( O
# F8 t9 M! ~& E; j! {8 R* ?    BUTTON CUSTOMER_BUTTON_26 I# \- {8 B- {% o0 n
   
+ K/ X$ q5 O  L! O, }8 n    BUTTON CUSTOMER_BUTTON_3
  H! u( k, J. t  s) R   
4 S9 S. c8 ^( U7 U+ H, n3 [9 U    BUTTON CUSTOMER_BUTTON_4
& X% W- _0 z# o1 q+ o    ) I6 Q5 Z) f" g0 g
    BUTTON CUSTOMER_BUTTON_5
' M1 N% P- W5 \2 r: l    / Y  ]5 s7 m% @2 x/ w) n
END_GALLERY
; D6 [4 n, q. r# D5 h
7 e( N* L& Y! m) e% m3 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二次开发专题模块培训报名开始啦

    我知道了