We have several (20+) DGNLIBs used to define Quick Access Toolbars (QAT) for various user disciplines, and would like to be able to create a batch job that performs the RIBBON CUSTOMIZATIONS EXPORTECXML command against all of them, one by one, and write the output XML to a specific (or even the default) XML file without human intervention. That is, within a batch job or script.
If you specify: RIBBON CUSTOMIZATIONS EXPORTECXML <filename.XML>, it 1) asks you if you want to save the file, and 2) it doesn't even save the file (that I can find). Even if I leave off an output XML filename -- and allow it to write to the default location -- I still get a dialog confirming that I really want to write to the default file location (in my profile %temp% folder). That works, but I cannot get rid of the confirmation dialog.
1. Is there any way to suppress the output XML file confirmation, either default location or a specific location? <-- (this is the primary concern)
2. When you specify an output XML file, it confirms your decision, but does not write to the file. Is this by design?
Or, are we doing something wrong?
Thanks in advance,
MicroStation CE Update 10.10.00.28
glhouck said:would like to be able to create a batch job that performs the RIBBON CUSTOMIZATIONS EXPORTECXML command
In my opinion, when there are about 20 such files, it's faster to do it manually than to investigate how to hack MicroStation key-in and to find working workaround.
glhouck said:Is there any way to suppress the output XML file confirmation, either default location or a specific location?
I think not.
glhouck said:If you specify: RIBBON CUSTOMIZATIONS EXPORTECXML <filename.XML>
You should be aware that file name specification is not documented in MicroStation help file, so it's probably something "under construction" and it's not clear what the result should be. Official key-in is "ribbon customizations exportecxml" without the file name.
glhouck said:Or, are we doing something wrong?
I think you should use the described key-in without the file specification. But to automate this workflow requires to control opened dialog using modal dialog handler in VBA. But it should be possible, the basic code is created by VBA recorder.
Can you provide more details why you want to save the customizations to XML file?
Labyrinth Technology | dev.notes() | cad.point
Thank you for your response, Jan!
The primary reason we would like to export the QATs (and all Ribbon Customizations) to XML files, is to give us the ability to update them easily once they are in textual format. If we have to find & perform global changes across all the disciplines' QATs (e.g., architectural, civil, substation, ras, etc.), we can do it en masse with a text editor, rather than being stuck with opening each DGNLIB and performing individual edits, one at a time.
You are correct in saying that if it were a one-time activity, it would be done by now, but since it is not a one-time activity, performing it manually is not an attractive option. And there are actually more DGNLIBs, when you take into account Tools, Levels, Dimensions, Text-Styles, etc., if we wanted to automate all of them as well.
Obviously, if we need to change the structure and location of the various items/commands in the QATs and Ribbon, we will likely have to use the Customization interface.
What I found most interesting (frustrating?) is the fact that putting an output XML file name on the EXPORTECXML command, gave the appearance of accepting it & waning you to confirm it, but does nothing with the information. It does not appear to create an XML file anywhere that I can determine. As you say: it is probably a work-in-progress.
We were trying to get away with a simple MicroStation keyin script file to do the job, but if we want to pursue this, a VBA or MDL app may be the only solution. Trouble is, it has to iterate through the Workspace, Worksets, DGNLIB files, XML files, etc., and that makes it interesting.
Thanks for your insights,
glhouck said:is to give us the ability to update them easily once they are in textual format.
It makes sense. My recommendation, but I am aware it's not applicable to the most of users, because it requires both MicroStation SDK documentation and XML knowledge, is to stay away from "user's click style" of customization and to define ribbon content (should include also QAT, but I have not tested it yet) using XML file as desribed in MicroStation API documentation.
It's not the same XML as exported by MicroStation and it provides more features, but it requires to write XML manually, which is not typical users' task.
glhouck said:What I found most interesting (frustrating?) is the fact that putting an output XML file name on the EXPORTECXML command, gave the appearance of accepting it & waning you to confirm it, but does nothing with the information.
You use not officially documented key-in, so are not allowed to tell anything ;-)