<?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>Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/109149/visual-basic---activemodelreference-addelement---question-about-the-global-origin-vs-the-ucs</link><description>When I use this command, the element is placed relative to the global origin. 
 
 How do I use this command and have it place the element in relation to the UCS? 
 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332182?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 13:18:46 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:c0f107fa-7691-426a-a7bd-907e3e3e7925</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Manslick&amp;quot;]Those links do not work on my system[/quote]&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not clear which links you mean.&amp;nbsp; If you mean the examples provided in VBA help (see Jan&amp;#39;s answer below) then there might be a problem with an HTML help (&lt;span style="font-family:courier new,courier;"&gt;.chm&lt;/span&gt;) document stored on a server.&lt;/p&gt;
&lt;p&gt;Read this article to see &lt;a target="_blank" title="LA Solutions: Enabling HTML Help over a Network" href="http://www.la-solutions.co.uk/content/HTMLHelpNetworkFix.htm"&gt;why a help document may not display&lt;/a&gt; if you open it from a network server. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332173?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 12:55:26 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:6b5e979c-8d60-413e-9dc0-cf2567ac724d</guid><dc:creator>Manslick</dc:creator><description>Jan, yes - when I fnally found the help file down in the navigator folder, it did work properly.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332171?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 12:49:35 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:a3235acc-a3da-4c33-a2c5-a650d8273cdd</guid><dc:creator>Manslick</dc:creator><description>Well, when I open help from the network, the link works.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332170?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 12:47:04 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4a11dbf3-5ceb-4cd6-99b2-82d0d51ab158</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Manslick&amp;quot;]I click on &lt;span style="color:#0000ff;text-decoration:underline;background-color:#ffffff;"&gt;Example&lt;/span&gt; and nothing happens.[/quote]&lt;/p&gt;
&lt;p&gt;And you did not try any other way how to find the example? To search for it using help search function or to try to find the example in Content tab, chapter Examples?&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: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332169?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 12:42:51 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:640efaf9-87a0-4a48-b84e-dc20a042fbc3</guid><dc:creator>Manslick</dc:creator><description>&lt;p&gt;I don&amp;#39; know Jan, I click on &lt;span style="color:#0000ff;text-decoration:underline;background-color:#ffffff;"&gt;Example&lt;/span&gt; and nothing happens.&lt;/p&gt;
&lt;p&gt;I get to the help files as Bob wrote above. F2 in the VBA editor takes me to the Object Browser and F1 opens this screen, but I can go no farther.&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/343173/7345.Capture.JPG"&gt;&lt;img src="/resized-image/__size/940x0/__key/communityserver-discussions-components-files/343173/7345.Capture.JPG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332166?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 12:31:49 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:fe4c5124-234d-4bda-b40b-0263eac0e574</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Manslick&amp;quot;]I was not able to see the examples. For unknown reasons those links do not work on my system. [/quote]&lt;/p&gt;
&lt;p&gt;It&amp;#39;s weird, examples are inseparable parts of MicroStation VBA help. So if you have the help file, you also have all examples. And at least you have to see the example in the list of examples.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/343173/MicroStation_2D00_VBA_2D00_help.jpg"&gt;&lt;img src="/resized-image/__size/940x0/__key/communityserver-discussions-components-files/343173/MicroStation_2D00_VBA_2D00_help.jpg" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t you open the help file from network folder? In such case .chm content is blocked by default.&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><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332165?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 12:26:07 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:187a1b98-a93d-4a89-8c70-0eb945d52ba1</guid><dc:creator>Manslick</dc:creator><description>Hi Jan, I was not able to see the examples. For unknown reasons those links do not work on my system. &lt;br /&gt;
But I was afraid I would get the answer you just gave. Now I know what to do.&lt;br /&gt;
Thank you.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332162?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 12:15:00 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:025b2827-02f9-46af-a1c2-e642cb02d138</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Manslick,&lt;/p&gt;
&lt;p&gt;did you study &lt;em&gt;Transform to and from ACS&lt;/em&gt; example mentioned by Bob?&lt;/p&gt;
&lt;p&gt;In VBA API, methods like AddElement always work with global coordinate system and they are not aware of ACSManager setting. If you want to create an element in ACS coordinates, you have to converts its coordinates into global system before AddElement methods is used. This is your responsibility, how to do it is demonstrated at the mentioned example.&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><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332154?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2015 11:52:03 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:eed12a9b-14d1-4a50-af25-353005d8dfe6</guid><dc:creator>Manslick</dc:creator><description>Hi Bob and thanks fo responding. I used the ACSManager like this:&lt;br /&gt;
&lt;br /&gt;
 ACSManager.DefineACS NewOrigin, NewAngle, msdACSTypeRectangular&lt;br /&gt;
&lt;br /&gt;
This moved the ACS graphic on the screen. &lt;br /&gt;
But when the progam looped back to the point routine that calculates th points to place the next graphic, it ignored the new ACS and placed the new object at the old 0,0,0 point. It&amp;#39;s like it does not know the ACS was moved.&lt;br /&gt;
&lt;br /&gt;
This is the code for adding the graphic.&lt;br /&gt;
    Set line = Application.CreateLineElement1(Nothing, Points) &lt;br /&gt;
    ActiveModelReference.AddElement line&lt;br /&gt;
Is something missing in this code that should refer to the new ACS?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Basic - ActiveModelReference.AddElement - question about the global origin vs the UCS</title><link>https://communities.bentley.com/thread/332068?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2015 20:29:51 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8a158841-5d9a-4bff-80d7-abe4f2b96ec4</guid><dc:creator>Robert Hook</dc:creator><description>MicroStation VBA provides an ACSManager to provide interaction with the current ACS/UCS coordinate system.  The MicroStation VBA help provides a sample of using the ACSManager titled: &amp;quot;Transform to and from ACS&amp;quot; and another example showing how to extract the origin can be found under the topic titled: &amp;quot;Rotating Elements&amp;quot;,  Example 5.&lt;br /&gt;
&lt;br /&gt;
A quick and accurate way to explore the VBA object model for any conceptual concepts is to use these key strokes:  Alt+F11 (Open VBA Editor, F2 (Open Object browser and perform a keyword search), Click on an item of interest in the Object Browser to provide context, then click: F1 (Open help for the item of interest).  Note:  When using the help topics, check to see if an &amp;quot;Example&amp;quot; hyperlink is available to provide you a convenient way to jump to some sample code on a given topic.&lt;br /&gt;
&lt;br /&gt;
HTH,&lt;br /&gt;
Bob&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>