Ribbon Customization - Deleting, Renaming Items on the Left Column of the Customize Ribbon Dialog Box

As we have been fine tuning our CONNECT Workspace, we have some customizations wanted for the MicroStation and the Open Roads Designer GUI. And we have others we want only for the Open Roads Designer GUI.

Unfortunately, the need to break out the MicroStation items came late in the game. Rather than start over, I tried making a copy of the GUI DGNLIB which I will call the Shared GUI DGNLIB. In the Shared GUI DGNLIB I removed the now duplicated items which are only needed for ORD. When I open a file in MicroStation CE, the ORD items no longer appear. While there, I cleaned up a few custom tool icons that were only displaying the Wrench (Tool) icon, assigning them more meaningful icons. 

However, when I open a file in ORD, while the ribbon items from the Shared GUI DGNLIB appear as desired, their actual content is apparently still coming from the left pane of the ORD GUI DGNLIB.

I want to delete the Tab and its groups, its panels and its buttons on the left pane of the ORD GUI DGNLIB, so that the newer "duplicates" in the Shared GUI dgnlib are used. I also have a few obsolete other left pane customizations that should either be deleted or renamed.

Is there some missing setting or configuration I need to use to allow me to clean up the left pane lists? 

    

Parents
  • Hi Chuck,

    unfortunately I am not sure whether I understand your situation right, because with no dialog capture it's not clear what do you mean by "the left pane lists" (there are three "columns / lists" in the dialog) and what do you see. Also, to follow the best practices and to specify the versions exactly may help, just for case there is not e.g. know issue in specific product version.

    Without all necessary information, I can provide only general analysis, which consists from 4 parts: A goal, possible ways how to reach it, tools to be used, and what you cant do in your situation.

    The goal is clear in my opinion: To implement ribbon customization, with different presentation in MicroStation and ORD (any other product in general).

    There are two ways how to do it:

    • To maintain two (or more) separate DGNLIBs, where the first one holds customization available everywhere (which implies MicroStation customization) and the second one with ORD customization. DGNLIBs have to be disjunctive (not overlapping / not containing the same definitions). It's simple, but does not work when the same tool should be realized differently in MicroStation and ORD (probably does not happen). Also, I am not sure whether tool IDs are always the same in different products and in different versions combinations (but i think we can expect a custom tool definition, based on MicroStation tool, works also in ORD).
    • To maintain only one DGNLIB, where "the split" is realized using Visibility definition. It requires to add Named Expression to DGNLIB, e.g. to check _ENGINENAME configuration variable content.

    Technically, there are (also) two options, how to realize such customization:

    • A common way is to use Ribbon customization tool. It's convenient, but limited, and also sometimes confusing because of lack of management tools (like to split, merge...).
    • "Developers' way" is to define ribbon using XML (but it's not XML exported from customization tool used in previous point). It provides full flexibility (more can be achieved with coding only), and can be done in plain MicroStation / ORD, but documentation of the XML is part of MicroStation SDK. An advantage of this approach is that XML is not a black box, accessible through (sometimes buggy) tool only.

    So, what you can do?

    To split existing DGNLIB is fine, but to keep DGNLIBs clean, I would prefer to export original (merged) definition to XML, duplicate it and to clean both from MicroStation (one) and ORD (second) tools. And to import the definitions back to new clean DGNLIBs (in MicroStation and in ORD, to ensure the referenced tools are available). It ensures there will be no relicts in DGNLIBs from previous modifications.

    With regards,

      Jan

  • First things first:

    We are working in ProjectWise, but that seems to be no where near as different as it used to be. PW seems to tolerate using CFG files virtually unchanged from a non ProjectWise operation.

    Secondly, my ability to use the SDK's is severely limited by many factors. One of them is the lack of adequate support staff. I am currently a one man band for maintaining our V8i Workspace Standards and developing our CONNECT Configuration. In fact, the ability to launch MicroStation CONNECT from a ProjectWise ORD Configuration is probably the only reason I have had the time to develop any MicroStation specific DGNLIB's and to want to hide portions of the ORD Workspace from it. Otherwise I would have probably spent weeks trying to figure out how to extract and configure the common portions into a MicroStation Configuration. Thanks to PW, it was a simple Right-Click > Open With to see what GUI items appeared in MicroStation that were ORD specific.

    So, getting back to the SDK, what is the quickest way to learn how to extract a ribbon XML file? I've used a tool with Office 365 to make custom ribbons, but I did not know there was some similar capability in the SDK.

    As far as implementing platform specific enhancements, I was planning on using CFG files as it is the most obvious method as well as being "old school" since my days of tweaking CFG files goes way back to CLIX and DOS.

    And as far as what do I mean by the Left Pane, here is an image. The far left area to me is only to select what I am customizing - Ribbon or QAT.

    The "Left Pane" I was talking about is the component selection area. This is where I really need to be able to rename of delete a component which is either a duplicate from another DGNLIB of probably not descriptive enough to my liking now that I'm deeper into my customizations.

    In this image, you can see an added workflow - Plats. The surveyors got a workflow delivered with the product, but in out agency, the surveyors who do plat work don't need most of the Survey workflow tools and do need some of the Geometry tool, among other things. This actually points out where I was first tripped up in my Ribbon Customization efforts - I had assumed when I made a new workmode, it was linked to the original tabs, panels and buttons, but if you removed a tab, panel or button, it was local to the new workflow. Wrong! My efforts to hide the Profile tools in the Plats workflow actually removed them for everyone! I found I needed to make a copy of any tab I needed to modify.

    So in my case, I have custom buttons which are duplicated in two DGNLIB's and I need to eliminate the obsolete ones so the workflows find the correct version. Which apparently is my guide to a work-around. I reversed the load order of the GUI DGNLIB's and that fixed the issue with the obsolete buttons being loaded. Now all I have to do is find out how to completely remove any obsolete components to prevent their accidental use in the future.  


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration
    Maryland DOT - State Highway Administration User Communities Page

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
  • Hi Chuck,

    So, getting back to the SDK, what is the quickest way to learn how to extract a ribbon XML file?

    I do not quite understand this statement, because you wrote your ability to use SDK is limited (and even more, I explained in my previous post it can be used without SDK).

    I guess you are mixing "EC XML" (exported from MicroStation) and "developers' way" based on "ribbon XML", even though I split these to options explicitly.

    To export EC XML from MicroStation, use standard key-in "ribbon customizations exportecxml".

    This is where I really need to be able to rename of delete a component which is either a duplicate from another DGNLIB of probably not descriptive enough to my liking now that I'm deeper into my customizations.

    I have never thought too much about this list, but in my opinion it's not related to customization (what is stored in DGNLIB), but it's what available as a source. So, when there are many customizations and more DGNLIBs used, naturally they are displayed as potential sources of customization.

    I think, when you will clear used DGNLIBs to have two only, one shared and one with ORD customizations only, this issue will be solved. Ensure there is nothing stored in personal.dgnlib, where by default all ribbon customizations are stored. Maybe some relics are stored there?

    Regards,

      Jan

  • Well, that Key-in is interesting. In ProjectWise, it prompts for a PW location, but never creates a document in ProjectWise, only in the working directory "shadow" folder.

    So would you recommend exporting all customizations to XML, and with new DGNLIB's bring in the appropriate XML files to rebuild them.

    While I am pretty comfortable with XML files, is there any type of tool except for my favorite text editor to modify the contents?


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration
    Maryland DOT - State Highway Administration User Communities Page

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
  • In ProjectWise, it prompts for a PW location, but never creates a document in ProjectWise, only in the working directory "shadow" folder.

    It looks like the authors did not take ProjectWise in account ;-)

    So would you recommend exporting all customizations to XML, and with new DGNLIB's bring in the appropriate XML files to rebuild them.

    Yes. In my opinion it's harder way (and more risky ;-), but leading to better results, because you know exactly, what is imported into clean DGN.

    And in your case, when it's about to split one file into two, so from two copies, "opposite parts" should be deleted, it should be straightforward modification.

    While I am pretty comfortable with XML files, is there any type of tool except for my favorite text editor to modify the contents?

    Professional very powerful (but not cheap) XML editors exist, but usually I use Visual Studio (which you probably do not have), or Visual Studio Code (VSC) with proper plugin(s).

    I treat VSC as one from the best and versatile editors today, especially when you have enough RAM (because JavaScript / TypeScript / Node.js code, encapsulated into Electron application, are often memory hungry ... but not as much as some web browsers today ;-)

    With regards,

      Jan

  • Hi Chuck & Jan,

    I have created a XSLT style sheet that converts the EC XML structure to Ribbon XML. This saves a lot of time because you can basically just export your toolbar / ribbon customizations from the DGNLIB to an XML file, run it through the convertor and use the Ribbon XML in your workspace configuration.

    I have not fully applied all the tags. Just the most common ones (Buttons, Groups, Tabs, etc) but I'll add the missing ones if you supply an EC XML containing other types of customizations.

    I have also created a conversion exe app that applies the conversion to multiple files at a time.

    Please let me know if anyone is interested. I will supply the conversion tools to you for free.

    Kind Regards,

    Francois Grobler

  • I would be interested in seeing how that XSLT works. I've done a lot of XSL modifications for the report browser of InRoads and a limited amount for ORD. While I've thought about doing others, time has always been my limiting factor.  


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration
    Maryland DOT - State Highway Administration User Communities Page

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
Reply Children
  • Bump! 

    I have created a XSLT style sheet that converts the EC XML structure to Ribbon XML. This saves a lot of time because you can basically just export your toolbar / ribbon customizations from the DGNLIB to an XML file, run it through the convertor and use the Ribbon XML in your workspace configuration.
    ...
    I have also created a conversion exe app that applies the conversion to multiple files at a time.

    Please share. I have also submitted a friend request, if you only wish to share in a private message.

    I'm actually pretty good with XSL but have no information of the makeup of Ribbon XML.

    And why reinvent the wheel, if someone offers to share what they have started.


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration
    Maryland DOT - State Highway Administration User Communities Page

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
  • Hi Chuck,

    I created a ribbon convertor that applies the XSL Template for you.

    I attached the zip file containing the setup to this post. I hope it works for you.

    I created the quick convertor app, and then got distracted before I could upload the result. My apologies.

    Let me know if it works for you or if you have any questions. I did not implement all possible permutations of the conversion, only the ones I needed at the time, but it is easy to expand the set.

    The tool will ask for source xml files and a target file. You can add mutltiple files and do a bulk conversion as well.

    RibbonConvertor.zip