<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CE Update 13: Remove workflow from ribbon before import</title><link>https://communities.bentley.com/products/administration/f/product-administration-forum/204036/ce-update-13-remove-workflow-from-ribbon-before-import</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: CE Update 13: Remove workflow from ribbon before import</title><link>https://communities.bentley.com/thread/613046?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 15:34:41 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4755dd1d-ee4f-4c0b-9cd2-eb926025f3f6</guid><dc:creator>Jan Šlegr</dc:creator><description>[quote userid="508869" url="~/products/administration/f/product-administration-forum/204036/ce-update-13-remove-workflow-from-ribbon-before-import/613030"]but in fact I would like to have some kind of callback that is invoked for each element.[/quote]
&lt;p&gt;It seems you (still) have not read ribbon documentation, available in MicroStationAPI, as I recommended in another thread.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CE Update 13: Remove workflow from ribbon before import</title><link>https://communities.bentley.com/thread/613030?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 14:31:59 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:36edaf1a-e555-45e1-a1be-f095e11f8769</guid><dc:creator>Robert Kock</dc:creator><description>&lt;p&gt;OK. I got the point.&lt;/p&gt;
&lt;p&gt;So let&amp;#39;s assume I compose the ribbon statically with all possible elements (tabs, groups, buttons, dropdown buttons, submenus) enabled.&lt;/p&gt;
&lt;p&gt;As soon as the user selects a&amp;nbsp;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;In the API documentation I found the functions &lt;em&gt;mdlNamedExpression_EvaluateAs*&lt;/em&gt; but I&amp;#39;m not sure when and how these functions are called.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Robert&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CE Update 13: Remove workflow from ribbon before import</title><link>https://communities.bentley.com/thread/612591?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2020 13:56:15 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0081f8d5-6ecd-43ef-b0c0-ba8b09cbb2e2</guid><dc:creator>Marc Thomas</dc:creator><description>&lt;p&gt;Hi Robert,&lt;/p&gt;
&lt;p&gt;Jan is absolutely correct about the purpose of the XML files.&lt;/p&gt;
&lt;p&gt;Potentially simpler alternatives (depending on what you want to do) are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Storing ribbon customisations in DGNLIBs that are included in/excluded from the&amp;nbsp;MS_GUIDGNLIBLIST variable by configuration at the appropriate level.&lt;/li&gt;
&lt;li&gt;Using named expressions (also in DGNLIBs) to show/hide tools according to context (as Jan mentioned).&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CE Update 13: Remove workflow from ribbon before import</title><link>https://communities.bentley.com/thread/612512?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2020 05:42:39 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:6e0e480f-8361-428f-9ee8-c7de59f60ad0</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Robert,&lt;/p&gt;
&lt;p&gt;in my opinion it&amp;#39;s about misunderstanding of purpose of &amp;quot;customization XML file&amp;quot; usage (as I understand it).&lt;/p&gt;
&lt;p&gt;Ribbon customization tool provides limited (user level) access to ribbon definition. XML file, exported file serves more for storing the customization as a backup, plus optionally to migrate the customization between the files. But it&amp;#39;s not designed to be used as dynamic runtime change tool of the ribbon at a runtime.&lt;/p&gt;
[quote userid="508869" url="~/products/administration/f/product-administration-forum/204036/ce-update-13-remove-workflow-from-ribbon-before-import"]An eventual existing workflow with the same name is not overwritten but some sort of duplication is created.[/quote]
&lt;p&gt;I guess exact overwriting definition is allowed only in ribbon definition, described in MicroStationAPI help (which I recommend to you already).&lt;/p&gt;
[quote userid="508869" url="~/products/administration/f/product-administration-forum/204036/ce-update-13-remove-workflow-from-ribbon-before-import"]We want to import an XML without the user being asked anything.[/quote]
&lt;p&gt;You are using wrong tool. Ribbon customization is the tool designed to be used by users, not by applications at runtime.&lt;/p&gt;
[quote userid="508869" url="~/products/administration/f/product-administration-forum/204036/ce-update-13-remove-workflow-from-ribbon-before-import"]Any suggestions?[/quote]
&lt;p&gt;I wrote it in another discussion already: When you want to change completely ribbon completely dynamically, ribbon NET API is probably the only way to go. The problem is that it&amp;#39;s not well documented, so it can be a bit adventurous (personally I think it&amp;#39;s doable).&lt;/p&gt;
&lt;p&gt;As a workaround, even when I think it&amp;#39;s quite dirty, is to modify ribbon xml definition at runtime (do not confuse this file with customization EC xml file). It requires to be very precise to do not break exact XML format (plus XSD definition), but as far as I remember, when ribbon is reloaded (which is huge and quite expensive operation), xml file(s) is reloaded and current content is used.&lt;/p&gt;
&lt;p&gt;And as third, because you have still not provided any proof it&amp;#39;s not possible, can be fully standard way to define a set of ribbon customizations (in ribbon xml) and to control it&amp;#39;s visibility using expressions and show/hide conditions.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>