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界面转换的菜单开发技巧

2015-1-9 10:40| 发布者: admin| 查看: 6563| 评论: 0|原作者: admin

摘要: 关于NX二次开发,经典界面到RIbbon界面转换的菜单开发技巧 在经典界面下,需要的文件 customer_men.mencustomer_toolbar.tbr 在ribbon界面下你可能需要的文件 customer_men.mencustomer_tab.rtbcustomer_toolbar.t ...
关于NX二次开发,经典界面到RIbbon界面转换的菜单开发技巧
经典界面到RIbbon界面转换
在经典界面下,需要的文件
  • customer_men.men
  • customer_toolbar.tbr
在ribbon界面下你可能需要的文件
  • customer_men.men
  • customer_tab.rtb
  • customer_toolbar.tbr
  • customer_toolbar_alternate.tbr
  • customer_group.grb



举例如下:


customer_men.men
!
!  Customer menu file
!
!  Contains button definitions to be used in
!  toolbars and Ribbon files
!

VERSION 120

EDIT UG_GATEWAY_MAIN_MENUBAR

TOP_MENU
    CASCADE_BUTTON CUSTOMER_MENU
    LABEL Customer Menu

END_OF_TOP_MENU

MENU CUSTOMER_MENU

    BUTTON CUSTOMER_BUTTON_1
    LABEL Menu Button1
        RIBBON_LABEL Ribbon Button1
        TOOLBAR_LABEL Toolbar Button1
    BITMAP fileopen

    BUTTON CUSTOMER_BUTTON_2
    LABEL Menu Button2
        RIBBON_LABEL Ribbon Button2
        TOOLBAR_LABEL Toolbar Button2
    BITMAP filesave

    BUTTON CUSTOMER_BUTTON_3
    LABEL Menu Button3
        RIBBON_LABEL Ribbon Button3
        TOOLBAR_LABEL Toolbar Button3
    BITMAP current_feature

    BUTTON CUSTOMER_BUTTON_4
    LABEL Menu Button4
        RIBBON_LABEL Ribbon Button4
        TOOLBAR_LABEL Toolbar Button4
    BITMAP block

    BUTTON CUSTOMER_BUTTON_5
    LABEL Menu Button5
        RIBBON_LABEL Ribbon Button5
        TOOLBAR_LABEL Toolbar Button5
    BITMAP checkgreen

END_OF_MENU



customer_ribbon_tab.rtb
!
!  Customer Ribbon Tab
!
!  This file will create a new customer tab containing three groups and
!  one top level button.
!

TITLE  Customer Tab
VERSION 170

!  The first group represents a Ribbon group that references an existing
!  toolbar with no Ribbon style changes.  
!
!  This is the quickest way to add existing toolbar content into Ribbon mode.
!
GROUP  customer_toolbar.tbr

!  The second group represents a Ribbon group that references an existing
!  toolbar with Ribbon specific style changes added to it.  There is no difference
!  in how this toolbar is referenced in the .rtb file compared to the first
!  toolbar as a group.  The only differences from the first group exist within
!  the .tbr file itself.
!
!  This approach has advantages for customers that will deploy both Ribbon and
!  Classic Mode customizations since all the content is defined in the .tbr
!  file and it will stay synchronized in both modes.  Only one set of customizations
!  will need to be maintained while still making use of RIBBON_STYLE to
!  control the presentation of the buttons on the Ribbon.
!
GROUP  customer_toolbar_alternate.tbr

!  The third group represents a Ribbon group that has been created explicitly
!  as a Ribbon group and will not exist in Classic Toolbar mode.  This is the
!  preferred option since the user will be able to take advantage of all the
!  layout styles and containers offered by the Ribbon.  
!
!  For customers that will deploy both Ribbon and Classic Mode customizations,
!  this approach will result in no synchronization and two sets of customizations
!  will need to be maintained.
!
!  A group can alternatively be defined directly inside the .rtb file by using the
!  keywords BEGIN_GROUP and END_GROUP.  
!
GROUP  customer_group.grb

!  Example of a button that is placed directly on the Ribbon without being
!  contained in a group.  This is a simple way to add a button to a tab
!  but is not recommended for many buttons since groups have advantages.
!  
!  A few advantages of groups:
!     1. Easier to move many buttons around together in quick customization.  
!        For example, MB3 on a group and choose "Add to Left Border Bar".  
!        This will move the whole group to a new location.  If buttons are
!        not in a group, they need to be moved one at a time.
!
!     2. Provide a label to describe its contents.
!
BUTTON CUSTOMER_BUTTON_1
LABEL Button1 Directly on Tab



customer_toolbar.tbr
!
!  Customer Toolbar File
!
!  This is similar to an existing toolbar file containing
!  no Ribbon changes.
!
!  In Classic Toolbars mode - This toolbar will still show up in the
!     toolbars list.
!
!  In Ribbon mode - This toolbar will be automatically converted to a
!     Ribbon group and will appear in the "Classic Toolbars as Groups"
!     section in the Customize dialog.
!  

TITLE Toolbar
VERSION 170

BUTTON CUSTOMER_BUTTON_1

BUTTON CUSTOMER_BUTTON_2

BUTTON CUSTOMER_BUTTON_3

BUTTON CUSTOMER_BUTTON_4

BUTTON CUSTOMER_BUTTON_5



customer_toolbar_alternate.tbr
!
!  Customer Toolbar File (Alternate)
!
!  This is similar to an existing toolbar file with new
!  Ribbon styles added.
!  
!  The RIBBON_STYLE will be honored when the toolbar is loaded
!  in Ribbon mode as a group but will be ignored when the toolbar
!  is displayed in Classic Toolbars mode.
!
!  In Classic Toolbars mode - This toolbar will still show up in the
!     toolbars list.
!
!  In Ribbon mode - This toolbar will be automatically converted to a
!     Ribbon group and will appear in the "Classic Toolbars as Groups"
!     section in the Customize dialog.
!

TITLE Toolbar (Alternate)
VERSION 170

BUTTON CUSTOMER_BUTTON_1
LABEL Toolbar(Alt) Button1
RIBBON_STYLE LARGE_IMAGE

BUTTON CUSTOMER_BUTTON_2
LABEL Toolbar(Alt) Button2
RIBBON_STYLE LARGE_IMAGE

BUTTON CUSTOMER_BUTTON_3
LABEL Toolbar(Alt) Button3
RIBBON_STYLE SMALL_IMAGE_AND_TEXT

BUTTON CUSTOMER_BUTTON_4
LABEL Toolbar(Alt) Button4
RIBBON_STYLE SMALL_IMAGE_AND_TEXT

BUTTON CUSTOMER_BUTTON_5
LABEL Toolbar(Alt) Button5
RIBBON_STYLE SMALL_IMAGE_AND_TEXT



customer_group.grb
!
!  Customer Ribbon Group File
!
!  In Classic Toolbars mode - This group will be unavailable
!
!  In Ribbon mode - This group will show up in the "All Groups" list
!     in the Customize dialog.
!
!  The labels of the buttons are defined using the RIBBON_LABEL token in the MEN files
!

TITLE Group
VERSION 170

!  No LABEL defined, using RIBBON_LABEL defined in customer_men.men
BUTTON CUSTOMER_BUTTON_1
RIBBON_STYLE LARGE_IMAGE

!  Example of a gallery defined in a GRB file.
!
!  If this gallery is to be used in other places, then it could be
!  defined in its own gallery (GLY) file and referenced here
!  Example:
!    GALLERY customer_gallery.gly
!
BEGIN_GALLERY  CUSTOMER_GALLERY
COLUMN_IN_RIBBON 2
COLUMN_IN_POPUP 2
LABEL Gallery
GALLERY_STYLE MEDIUM_IMAGE_AND_TEXT

    BUTTON CUSTOMER_BUTTON_2

    BUTTON CUSTOMER_BUTTON_3

    BUTTON CUSTOMER_BUTTON_4

    BUTTON CUSTOMER_BUTTON_5

END_GALLERY



鲜花

握手

雷人

路过

鸡蛋

相关阅读

最新评论

登录之后发表您得观点!
  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了