Custom Menu Item in CONNECT

Hey everyone!

So, I have a working MDL (written in C++) set up with Connect that provides functionality where I can intercept and basically override certain commands with my own functionality. In some cases, this functionality is launching an outside application. All of this works fine but now I'm trying to figure out how I can have a Menu Item that is also capable of launching an outside application that the user could just click.

In older versions of Microstation you could do this by having a custom MenuItem on the Menubar. However, since CONNECT basically no longer has a Menubar (it instead has the Ribbon and the Quick Access bar) I'm left wondering how I would get functionality like this. I've done a fair amount of research and the only method that I have come up with is to create my own custom dgnlib which adds a new item which could then execute a custom command I would define in my MDL which would launch the outside application.

However, what I want is to be able to provide this functionality without involving a dgnlib. Is this possible? If so, how would I set it up in my MDL? If there is no way to avoid relying on a dgnlib, how exactly would I go about doing that? I've messed around with creating a dgnlib but I'm still fairly clueless when it comes to working with them.

Thanks ahead of time for any responses!

Parents
  • Hi,

    Unknown said:
    In some cases, this functionality is launching an outside application ... In older versions of Microstation you could do this by having a custom MenuItem on the Menubar.

    In my opinion to use C/C++ code just to run outside application is simply overkill. I can imagine there are situations where the external process has to be started under some special conditions, but generally DGNLIB has provided enough functionality.

    Unknown said:
    and the only method that I have come up with is to create my own custom dgnlib which adds a new item

    To use DGNLIB and Customization tools to add own GUI customization to MicroStation is standard and preferred way from MicroStation V8 XM Edition, so about last 10 years.

    Unknown said:
    However, what I want is to be able to provide this functionality without involving a dgnlib. Is this possible?

    I guess it's not possible from C++, because as far as I know there is no C++ Ribbon API. If you want to use API and not DGNLIB from any reason, you have to use NET Ribbon API (e.g. using C++/CLI assembly or any other NET language). But Customization tools offer a wide range of options how Ribbon can be customized, so in my opinion should be treated as the last option when standard customization will be not enough.

    Unknown said:
    If there is no way to avoid relying on a dgnlib, how exactly would I go about doing that?

    It's pretty wide and complex topic, I recommend to study MicroStation help file. There are plenty of information available, you can start with Home > The Ribbon > Ribbon Interface > Customizing the Ribbon chapter. There is also video "Customizing the Ribbon in the MicroStation CONNECT Edition" available at Bentley LEARN server.

    With regards,

      Jan

Reply Children
No Data