<?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>[v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/171658/v8i-vba-create-view-independent-textnode</link><description>This question was never truly answered over 5 years ago, so I am asking again. 
 I can select a text node in the Element Information dialog box and change the text node to View Independent. And then, the entire Text node retains its rotation as the view</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494657?ContentTypeID=1</link><pubDate>Fri, 30 Nov 2018 15:31:57 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:6b98d1d9-aa17-410f-8b22-a1ff8c42efc4</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Chuck,&lt;/p&gt;
[quote userid="5740" url="~/products/programming/microstation_programming/f/microstation-programming---forum/171658/v8i-vba-create-view-independent-textnode/494640"]and this is from it&amp;#39;s VBA Help[/quote]
&lt;p&gt;seriously, you believe everything in documentation?&lt;/p&gt;
&lt;p&gt;One rule of development is &lt;em&gt;to try it&lt;/em&gt;, documentation can be out-of-sync easily (and often in it is in real world).&lt;/p&gt;
&lt;p&gt;Based on my 5 mins testing this text node setting can be changed both manually and using PropertyHandler.&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: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494650?ContentTypeID=1</link><pubDate>Fri, 30 Nov 2018 15:18:21 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4c956642-e085-43cb-ab42-a2a7a83f8270</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="5740" url="~/products/programming/microstation_programming/f/microstation-programming---forum/171658/v8i-vba-create-view-independent-textnode/494640"] I&amp;#39;m pretty sure I tried setting it on a TextNodeElement and was told it was not allowed[/quote]
&lt;p&gt;The point Jan is making is that, if you look at the text node in the &lt;em&gt;Element Properties&lt;/em&gt; dialog, you can modify it.&amp;nbsp; So it&amp;#39;s not read-only all the time &amp;mdash; only in VBA&amp;#39;s &lt;code&gt;ViewDependent&lt;/code&gt; property.&lt;/p&gt;
&lt;p&gt;Jan suggests that you try VBA&amp;#39;s &lt;code&gt;PropertyHandler&lt;/code&gt; to perform your edit.&amp;nbsp; There are examples in VBA help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494640?ContentTypeID=1</link><pubDate>Fri, 30 Nov 2018 14:35:03 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1c712e09-1d1f-410d-88f3-214c409e914d</guid><dc:creator>caddcop</dc:creator><description>&lt;p&gt;I&amp;#39;m running PowerInRoads Ss4 (08.11.09.832) and this is from it&amp;#39;s VBA Help:&lt;/p&gt;
&lt;h1 class="RH1"&gt;&lt;a name="usproisviewindependent"&gt;&lt;/a&gt;IsViewIndependent Property&lt;/h1&gt;
&lt;p class="ALNSR"&gt;Read/Write &lt;b&gt;Boolean&lt;/b&gt; for &lt;a href="/products/programming/microstation_programming/f/microstation-programming---forum/171658/v8i-vba-create-view-independent-textnode/494523/usobjTextElement.htm"&gt;TextElement&lt;/a&gt;.&lt;/p&gt;
&lt;p class="T"&gt;Read-only &lt;b&gt;Boolean&lt;/b&gt; for &lt;a href="/products/programming/microstation_programming/f/microstation-programming---forum/171658/v8i-vba-create-view-independent-textnode/494523/usobjTextNodeElement.htm"&gt;TextNodeElement&lt;/a&gt;.&lt;/p&gt;
&lt;p class="T"&gt;Gets or sets a value indicating whether this object is view-independent.&lt;/p&gt;
&lt;p class="T"&gt;And I&amp;#39;m pretty sure I tried setting it on a TextNodeElement and was told it was not allowed. But I can test again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494523?ContentTypeID=1</link><pubDate>Fri, 30 Nov 2018 05:17:58 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e87cd89f-27bd-4b9c-bb57-bca97b4be9c2</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Chuck,&lt;/p&gt;
[quote userid="5740" url="~/products/programming/microstation_programming/f/microstation-programming---forum/171658/v8i-vba-create-view-independent-textnode/494462"]It is Read Only for Text Nodes.[/quote]
&lt;p&gt;my MicroStation V8i (SELECTseries 4) tells me View Dependent property is not read only and can be changed both manually and using PropertyHandler.&lt;/p&gt;
&lt;p&gt;For me it seems it&amp;#39;s the solution of your question.&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: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494462?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2018 20:47:58 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:23f768ec-9abc-4278-8d5d-b58c1f01f263</guid><dc:creator>caddcop</dc:creator><description>&lt;p&gt;It is Read Only for Text Nodes. I know as I tried a bunch of work-arounds - all within VB without trying to figure out MDL Wrapper Functions - which I have used at least once with Jon and a few others help.&lt;/p&gt;
&lt;p&gt;BYW, creating a Note in VB results in an unassociated leader. By under contract go to VB guy just had to kludge together a work-around, where he literally inserts a previously created note in a cell, drops the cell and then replaces the text. Not very elegant but it worked.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494438?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2018 18:51:01 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:a652491e-4e1e-4afd-89b0-2a663d0c9be6</guid><dc:creator>Robert Hook</dc:creator><description>&lt;p&gt;Other than creating an Idea/Enhancement (that should be done), I see that &amp;quot;ViewDependent&amp;quot; is one of the common element properties that may be accessible&amp;nbsp;using the VBA PropertyHandler.&amp;nbsp;Though I did not check to see if that specific property is R/O or R/W, maybe give that a quick try to see if it can be used to work-around the is current missing accessor.&lt;/p&gt;
&lt;p&gt;HTH,&lt;br /&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494418?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2018 16:20:29 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7288426c-13e0-46df-9ed0-0744989ed47b</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="5740" url="~/products/programming/microstation_programming/f/microstation-programming---forum/171658/v8i-vba-create-view-independent-textnode/494406"]if you could explain or show me an example of what parameters[/quote]
&lt;p&gt;It&amp;#39;s hard.&amp;nbsp; You must create a VBA user-defined-type (UDT) that mimics &lt;code&gt;MDL&amp;#39;s TextParamWide&lt;/code&gt;.&amp;nbsp; However, that UDT contains some other UDTs, so you have to define them too.&amp;nbsp; Each UDT is a VBA type but must be binary-compatible with the MDL prototype.&lt;/p&gt;
&lt;p&gt;One approach would be to write an MDL applet to apply &lt;code&gt;IsViewIndependent&lt;/code&gt; to the VBA &lt;code&gt;TextNodeElement&lt;/code&gt; as you create it.&amp;nbsp; The simplest solution would be for Bentley to provide a &lt;code&gt;MakeViewIndependent&lt;/code&gt; method for &lt;code&gt;TextNodeElement&lt;/code&gt; .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494406?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2018 15:06:33 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5f6aa6da-643d-468f-8ea3-c2c9ccc11be3</guid><dc:creator>caddcop</dc:creator><description>&lt;p&gt;Jon,&lt;/p&gt;
&lt;p&gt;You always seem to know far more about programming than I. I&amp;#39;ve attached the procedure source as text. This is one procedure in a special MVBA that is delivered with Open Roads. When a survey is processed, you can identify which figures should call up a VB procedure and pass arguments to it. The end result, is that it generates a Test Label containing text strings according to the specific directions. This is one I&amp;#39;ve customized to look for attributes attached to survey shots of trees. Currently, the attribute names it searches for are SZ, TY and NB. It reads their values and generates on, two or three line labels as a text node.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/343173/4118.SHA_5F00_LabelTreeAttr.bas.txt"&gt;SHA_LabelTreeAttr.bas.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is actually possible that even if we find a way to generate a VI Text Node, that Open Roads will strip it off as part of its placement. Open Roads creates its own application elements from MicroStation primitives and attaches attributes to them that it recognizes so that these elements appear to be custom Civil Objects. So a file processed in Open Roads Survey, if opened in MicroStation only, will simply identify these as text node, cells and 3D linestrings. But if opened with MicroStation with Open Roads activated, it will see survey Points, Survey Labels and Survey Figures.&lt;/p&gt;
&lt;p&gt;So, if you could explain or show me an example of what parameters I need to pass to the function, I would be grateful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [v8i VBA] Create View Independent TextNode</title><link>https://communities.bentley.com/thread/494187?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2018 20:53:57 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:70805dfd-abba-41dd-bb38-1a1d11a1cb19</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="5740" url="~/products/programming/microstation_programming/f/microstation-programming---forum/171658/v8i-vba-create-view-independent-textnode"]How is one supposed to create view-independent text node element which is clearly supported by the software, in VB[/quote]
&lt;p&gt;When we create a text node element with MDL we pass a &lt;code&gt;TextParamWide&lt;/code&gt; parameter. &lt;code&gt;TextParamWide.viewIndependent&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt; is a flag that, presumably, does what you think it should.&lt;/p&gt;
&lt;p&gt;VBA works in a quite different manner to MDL.&amp;nbsp; You would need to wrap &lt;code&gt;mdlTextNode_createWide()&lt;/code&gt; in VBA.&amp;nbsp; Here&amp;#39;s its VBA declaration from the MDL documention...&lt;/p&gt;
&lt;pre&gt;Declare Function mdlTextNode_createWide Lib &amp;quot;stdmdlbltin.dll&amp;quot; ( _
        ByVal out As Long , _
        ByVal in_ As Long , _
        ByRef userOrigin As Point3d , _
        ByRef rotMatrix As Matrix3d , _
        ByVal size As Long , _
        ByVal txtParams As Long ) As Long&lt;/pre&gt;
&lt;p&gt;Where &lt;code&gt;txtParams&lt;/code&gt; is the &lt;code&gt;TextParamWide&lt;/code&gt; user-defined-type.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>