We need to enable or disable menu items based on the user who uses our add-on. We have developed the add-on using C++.
How this can be achieved in MS ? Please provide example for this.
MicroStation CE does not use menu, but ribbon, so it's not clear what do you want do disable.
Please provide more details, e.g. screen capture with description, what do you want to modify. And, whether you want to modify standard MicroStation GUI item (e.g. part of ribbon) or own customization.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Rama Shrinivasan said:We need to enable or disable menu items
MicroStation Help discusses how to customize the ribbon. Pay attention to this paragraph: Enable - Allows you to enable or disable the selected item based on the result of named expression selected in the drop-down menu. The named expression should return a boolean (True or False) result in order to work properly as a enable/disable property.
In other words, Named Expressions may be the technology that enables you to achieve your goal. The Administration Forum may be a fruitful source of information.
Regards, Jon Summers LA Solutions
Jan Šlegr said:MicroStation CE does not use menu, but ribbon, so it's not clear what do you want do disable.
I want to disable the buttons/options in the ribbon menu.
Jan Šlegr said:whether you want to modify standard MicroStation GUI item
In the above screen capture the Buttons(for eg. View attributes, Apply display style, Copy view, etc.) inside the tab groups(for eg. Presentation, Tools, etc.) needs to be disabled.
Rama Shrinivasan said:In the above screen capture the Buttons(for eg. View attributes, Apply display style, Copy view, etc.) inside the tab groups(for eg. Presentation, Tools, etc.) needs to be disabled.
I do not think it can be achieved easily, because MicroStation standard GUI is not designed to be accessed by 3rd party code directly..
The question is why to do it? The functionality will be still there through key-ins, view menus and maybe also mouse context menu.
What you can (probably) do is to replace the definitions (or maybe complete ribbon) by own definition, which will contain proper show expression or feature aspect definition.
Rama Shrinivasan said:We need to enable or disable
A ribbon item definition can contain show expression (show/hide) and feature aspect (enable/disable) conditions. They are evaluated when the ribbon is created or reloaded (which is quite time expensive process). Individual specification, when item is evaluated, can be defined using sync item definition (e.g. to enable icon when an element is selected).
For more details, see Ribbon chapter in MicroStation API documentation.
Rama Shrinivasan said:Please provide example for this.
As far I as I know there is no example available, but the description in API documentation is descriptive.