During the porting from V8i to CE, we intent to use a specific custom workflow that will take the place of the goold old menu.
This workflow is created and loaded dynamically (it will even change when the user changes DGN).
In order to do so, we build an XML file and import it from within an MDL application.
There are 2 problems:
1)
An eventual existing workflow with the same name is not overwritten but some sort of duplication is created. We could call ribbon customizations revertall first, but that deletes all customizations and we don't want that. We just want to delete the workflow with that specific name (without the user being asked anything).
2)
The key-in ribbon customizations importecxml opens a dialog asking the user to enter the filename. If I pass the filename within the command, it just asks me if I want to import the xml into Personal.dgnlib and it doesn't add the workflow to the ribbon. We want to import an XML without the user being asked anything.
Any suggestions?
Thanks,
Robert Kock
Hi Robert,
Jan is absolutely correct about the purpose of the XML files.
Potentially simpler alternatives (depending on what you want to do) are:
Regards
Marc
OK. I got the point.
So let's assume I compose the ribbon statically with all possible elements (tabs, groups, buttons, dropdown buttons, submenus) enabled.
As soon as the user selects a DGN, I need to evaluate which items need to be shown/hidden/enabled/disabled. This depends on the permissions of the user and the DGN itself (for instance, another user may have opened the same DGN). This information is found in our database. The DGNs themselves are also stored in the DB and a DGN is download when the user selects it.
I understand I need named expressions for this but in fact I would like to have some kind of callback that is invoked for each element.
In the API documentation I found the functions mdlNamedExpression_EvaluateAs* but I'm not sure when and how these functions are called.
Robert
Robert Kock said:but in fact I would like to have some kind of callback that is invoked for each element.
It seems you (still) have not read ribbon documentation, available in MicroStationAPI, as I recommended in another thread.
There is synchronization system available that ensure every show/hide condition of every ribbon control is evaluated when specific event (standard or custom one) is raised.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point