<?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>[CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/128230/connect-vba-sendkeyin</link><description>This part of code crashes CE. Is it only for me? 
 Sub place_text()
CadInputQueue.SendCommand &amp;quot;place text&amp;quot;
 CadInputQueue.sendkeyin &amp;quot;sometext&amp;quot;
End Sub</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/391101?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 09:16:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ede0fca1-7992-4a5b-b124-f11decb1fe13</guid><dc:creator>Oto</dc:creator><description>&lt;p&gt;for us the shift is 1000 meters&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/391099?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 09:00:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:35446e74-9239-444b-800b-39e4cb411006</guid><dc:creator>Artur Goldsweer</dc:creator><description>This could be caused by the selected setting for text justification. From previous tests justification &amp;quot;Top Left&amp;quot; gave correct results with using UOR, all other settings caused a shift.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/391083?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 08:04:26 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:683aa848-94f3-47e2-8eff-7cce6520694b</guid><dc:creator>Oto</dc:creator><description>&lt;p class="brush: vb; fontsize: 100; first-line: 1; "&gt;This approach also almost work, X coordinate is correct but for some reason Text is shifted by Y coordinate.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre class="brush: vb; fontsize: 100; first-line: 1; "&gt;pt.x = p.x * UORs
pt.y = p.y * UORs
 

Set oText = CreateTextElement1(Nothing, &amp;quot; Text&amp;quot;, pt, Matrix3dIdentity)      
 
ActiveModelReference.AddElement oText&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/391079?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 07:47:38 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8c0deafe-6407-4e36-ba08-03fb4f968281</guid><dc:creator>Artur Goldsweer</dc:creator><description>I can confirm this issue with text origin - Defect 278262 is filed to address this issue and the plan is to have this fixed with Update 4.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/391070?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 07:06:03 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:86ca1c1e-2c7d-4e93-b3b4-4b59959f0901</guid><dc:creator>Oto</dc:creator><description>&lt;p&gt;Another issue with CreateTextElement1 that I need to multiply origin with units resolution otherwise it is not correct. But same origin works for cell elements without issue. Is it by design?&lt;/p&gt;
&lt;pre class="brush: vb; fontsize: 100; first-line: 1; "&gt;Set oText = CreateTextElement1(Nothing, &amp;quot; Text&amp;quot;, Point3dZero, Matrix3dIdentity)

pt.x = p.x * UORs
pt.y = p.y * UORs

         oText.Origin = pt
        

ActiveModelReference.AddElement oText&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/391066?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 06:30:08 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:138eb8b5-40a5-4c82-b9ae-3c5fe76a2bd0</guid><dc:creator>Sumit Deshpande</dc:creator><description>It is an issue regressed in U2 and is in U3. We had found it earlier but fix failed to make it in U3 for valid reasons. As I mentioned above, this has been fixed in WIP builds of U4. &lt;br /&gt;
&lt;br /&gt;
As a work around for now, you can use text editor or can record text placement script using text editor.&lt;br /&gt;
&lt;br /&gt;
CadInputQueue.SendKeyin &amp;quot;TEXTEDITOR PLACE&amp;quot;&lt;br /&gt;
CadInputQueue.SendKeyin &amp;quot;TEXTEDITOR PLAYCOMMAND INSERT_TEXT &amp;quot;&amp;quot;something&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Or you can use VBA object model as RoadWing and Robert mentioned.&lt;br /&gt;
&lt;br /&gt;
In our reply, we haven&amp;#39;t mentioned anything on removal / replacement. Please take a note on this.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/391052?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 05:26:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1d73f810-1d1e-400c-9de7-bbe8bc93f3d0</guid><dc:creator>Oto</dc:creator><description>Strange that key-in: &amp;quot;place text;sometext&amp;quot; crashed also but after I placed text with normal dialog it worked afterwards. We have textstyles that are  attached from dgnlib so it may be related to fact that no textstyle was active.&lt;br /&gt;
&lt;br /&gt;
I hope place text key-in will not removed as this is useful for placing automatic texts from simple interface tools.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/391043?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 03:16:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5b374979-d242-442d-a326-06ea04eacb6b</guid><dc:creator>Sumit Deshpande</dc:creator><description>This issue has been fixed in current WIP builds for update 4.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/390993?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2016 18:21:46 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0839e4fd-9f18-40a2-a3c8-f27d1ab86ca8</guid><dc:creator>Robert Hook</dc:creator><description>Thank you for reporting this issue.  I have filed Defect 620571 to be considered for inclusion into a future version release.  To work-around this behavior as RodWing suggested, please consider using the MicroStation VBA object model functionality related to creating text.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT VBA] Sendkeyin</title><link>https://communities.bentley.com/thread/390950?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2016 13:19:59 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3801512d-2c26-4b90-8a90-7a3e6d8dff7d</guid><dc:creator>Rod Wing</dc:creator><description>It&amp;#39;s not just your macro. The same thing happens when you enter those key-ins into the Key-In Browser. I&amp;#39;m actually surprised the Place Text key-in is still available. According to the documentation all of the older text editor interfaces are no longer supported in CONNECT, only the word processor dialog interface is supported for text element creation.&lt;br /&gt;
&lt;br /&gt;
I would suggest you take a look at the CreateTextElement1 function in the VBA Help and use that.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>