<?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>[ORD VBA] Automate Toggle of &amp;quot;Use Active Feature&amp;quot; Feature Definition Toolbar button</title><link>https://communities.bentley.com/products/programming/civil_programming/f/civil_programming_forum/195382/ord-vba-automate-toggle-of-use-active-feature-feature-definition-toolbar-button</link><description>Hi, 
 
 I&amp;#39;m trying to automate the pre-filling of the &amp;quot;Set Feature Definition&amp;quot; dialog in VBA and can get it to work if I select the Feature Definition in the Feature Definition toolbar and select the &amp;quot;Use Active Feature&amp;quot; function of the Toolbar. 
 
 The</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580568?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 11:34:25 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:04d0e30e-8a79-4197-a073-55c3bbb11dd8</guid><dc:creator>Mark Shamoun</dc:creator><description>&lt;p&gt;Thanks Andy, much appreciated.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Essentially im trying to use the following VBA code to automate setting Feature Definitions for imported Geometry (mainly GENIO). It reads an excel spreadsheet that details Linear Feature Name prefixes and a corresponding Feature Definition to map. It then scans the model and sets Feature Definition for elements using the (crude) method below.&lt;/p&gt;
&lt;p&gt;It has been working fine, but has always needed the user to physically click the Active Feature Override button on the Feature Definition toolbar as the first line of code didn&amp;#39;t work as expected (hopefully fixed now):&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;CadInputQueue.SendKeyin &amp;quot;GEOMETRY ACTIVEFEATUREOVERRIDE TRUE&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;CadInputQueue.SendKeyin&amp;nbsp;&amp;quot;GEOMETRY FEATUREDEFINITION SET&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;CadInputQueue.SendKeyin &amp;quot;CIVILCMD SETVALUE FeatureType=&amp;lt;FeatureType&amp;gt;6,False&amp;lt;/FeatureType&amp;gt;&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;CadInputQueue.SendCommand &amp;quot;GEOMETRY SETACTIVEFEATURE &amp;quot; + oFeatDefName&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;CadInputQueue.SendDataPoint oPoint, oView&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Ideally we could streamline this whole process to not even need to use the Feature Definition toolbar if the following recorded VBA could be used in new VBA macros (it currently does nothing)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt; CadInputQueue.SendKeyin &amp;quot;CIVILCMD SETVALUE FeatureDefinition=&amp;lt;FeatureDefinition&amp;gt;Bentley.CifNET.GeometryModel.ContentManagement.LinearObjectSettings, Bentley.CifNET.GeometryModel.4.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4bf6c96a266e58d4|&lt;strong&gt;Linear\Earthworks\D-EWKS-Back of Drain&lt;/strong&gt;|False&amp;lt;/FeatureDefinition&amp;gt; &amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580496?ContentTypeID=1</link><pubDate>Wed, 15 Apr 2020 07:55:03 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b17d1a30-3b64-40d2-8aef-230db20abe5d</guid><dc:creator>Andy Farr</dc:creator><description>&lt;p&gt;I have logged a defect and made a fix in the code. This should be available in the next Release. If you have any more detail that I can use to confirm it fixes your use-case please pass along.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580303?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 14:00:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:c4afb158-b51a-40f1-901d-6fcc82efa5c9</guid><dc:creator>Andy Farr</dc:creator><description>&lt;p&gt;Hmmm I will have to investigate the code further. If it does not work it is a defect that needs logging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580286?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 13:06:56 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:52ca4381-60b3-4815-8cbd-27a86f3536c1</guid><dc:creator>Mark Shamoun</dc:creator><description>&lt;p&gt;Hi Andy,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Try these keyins in ORD without physically clicking the Toggle button. Unfortunately they light up the Toggle Icon, but do not actually work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580284?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 13:04:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:bc30a99e-53ff-436f-8db4-d43f896b7283</guid><dc:creator>caddcop</dc:creator><description>&lt;p&gt;It did not seem to work consistently.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The toolbar, if open, did not reflect the change unless hovered over.&lt;/li&gt;
&lt;li&gt;I believe unless hovered over, it often did not actually activate.&lt;/li&gt;
&lt;li&gt;We tried sending view commands and a reset to cause it to refresh (a trick we sometimes had to use with tool settings to get it to refresh) and that did not help.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There may have been more, but I tested it and one other person, We both worked without the others knowledge and when we discussed it finally, we both were in agreement that the efforts had been less than successful.&lt;/p&gt;
&lt;p&gt;That said, if it works in ORD, that&amp;#39;s a bonus - when we finally have a production workspace.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580281?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 12:28:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ad12e2f6-50bd-40f8-83fa-74b9f4f96f9a</guid><dc:creator>Andy Farr</dc:creator><description>&lt;p&gt;this was available in SS4&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580280?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 12:24:22 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7d986a5c-e4b2-4a85-82b7-79e185695fd0</guid><dc:creator>Andy Farr</dc:creator><description>&lt;p&gt;GEOMETRY ACTIVEFEATUREOVERRIDE&amp;nbsp; -&amp;gt; will toggle the setting&lt;/p&gt;
&lt;p&gt;GEOMETRY ACTIVEFEATUREOVERRIDE True -&amp;gt; will set it on&lt;/p&gt;
&lt;p&gt;GEOMETRY ACTIVEFEATUREOVERRIDE False -&amp;gt; will turn it off&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580279?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 12:20:11 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:04a3f985-05cf-460a-8d33-c3e619063179</guid><dc:creator>Andy Farr</dc:creator><description>&lt;p&gt;I believe the KeyIn should be &amp;quot;GEOMETRY ACTIVEFEATUREOVERRIDE True&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [ORD VBA] Automate Toggle of "Use Active Feature" Feature Definition Toolbar button</title><link>https://communities.bentley.com/thread/580039?ContentTypeID=1</link><pubDate>Mon, 13 Apr 2020 11:52:57 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:22d3686b-281b-48ec-900d-50b959333c9b</guid><dc:creator>caddcop</dc:creator><description>&lt;p&gt;We could never get this to work in Ss4 and felt like it was a lost cause there. If this is not exposed as a key-in, it should be.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is the Civil equivalent of Setting an element template and locking the use element template button.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>