Hi folks,
I'm trying to use the new ribbon interface to replace my old V8i toolbox in my app. Under V8i I would disable or enable individual icons in the toolbox via calls to mdlDialog_item*() functions. Since I can't control what gets displayed/disabled in the ribbon via direct calls to the SDK, I've been trying to use named expressions hooked into the dialog access strings published as CExpressions, which are then delivered in a DGNLIB file.
For example, if my app is called "MyAppName" and it has a global variable published with the name "MyBooleanVariable", then I can add a named expression "MyNamedExpression" with the expression set to: "Session.EvalCExprAsBool("MyBooleanVariable","MyAppName")", and this seems to work correctly if MyAppName.MA is loaded and the boolean variable "MyBooleanVariable" is published via a call to mdlDialog_publishBasicVariable().
This has caused me to ponder the following questions:
- How do I define my own Symbol Sets that appear in the Named Expression Editor dialog? Can this be done at runtime of MyAppName, or does it have to be predefined in a DGNLIB?
- Is it possible to make the symbol sets published via the mdlCExpression_ functions in my app appear in the Named Expressions dialog? If so, how? If not, why do Symbol Sets differ between C++ MA's and C# Add-ins?
- I have successfully added a named expression that "tests" correctly in the named expression dialog, and saves to the DGNLIB, but it doesn't appear as a selection from the Customize Ribbon dialog for "Visibility" nor "EnableExpression" unless the DGNLIB is defined in MS_DGNLIBLIST. Similarly, my custom ribbon does not appear in the Ribbon Editor unless it appears in MS_GUIDGNLIBLIST. This forces me to deliver both the ribbon and the Named Expressions the ribbon depends on in separate DGNLIBs. Why does this limitation exist and why isn't it documented? (I wasted hours trying to figure this out).
- Why does MicroStation crash whenever I click on the "..." button to choose an Icon when editing the keywords in the Named Expressions dialog? This happens 100% of the time for me in Connect Edition Update 4.
- How are 3rd party apps expected to deliver the interface to customers? It seems we can no longer just provide MAs/DLLs, we now need DGNLIBs and config files that add the DGNLIBs to existing search paths. This seems fraught with potential problems if a custom config file overwrites the DGNLIB search path.
A working example of a custom ribbon would have been really useful in the Connect SDK, but if anyone known any answers here it would also be very helpful.