<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Text split in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961384#M13593</link>
    <description>&lt;P&gt;I have no idea who &lt;STRONG&gt;YaziOlustur&lt;/STRONG&gt; is or how his routine works.&amp;nbsp; I am simply trying to give you some pointers.&amp;nbsp; If you need to create more than one DBtext, you need to create a loop after you split the string to add the texts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; string value = "25ø8/10 L=250";
 string[] results = value.Split(" ");

 for (int i = 0; i &amp;lt; results.Length; i++)
    {
      Create the DBtext here
    }&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 20 Feb 2022 15:28:33 GMT</pubDate>
    <dc:creator>HJohn1</dc:creator>
    <dc:date>2022-02-20T15:28:33Z</dc:date>
    <item>
      <title>Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10960272#M13590</link>
      <description>&lt;P&gt;Hello everyone !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am printing a text in the form of &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;25ø8/10 L=250&lt;/STRONG&gt;&lt;/FONT&gt; on a point using "&lt;STRONG&gt;YaziOlustur&lt;/STRONG&gt;" method.&lt;/P&gt;&lt;P&gt;How can I separate the &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;L=250&lt;/FONT&gt;&lt;/STRONG&gt; part while printing it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;well ;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;25ø8/10&lt;/STRONG&gt;&lt;/FONT&gt; a DBText &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;L=250&lt;/STRONG&gt;&lt;/FONT&gt; a DBText&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;25ø8/10&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;L=250&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2022 07:59:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10960272#M13590</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-02-19T07:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961030#M13591</link>
      <description>&lt;P&gt;"Separate while printing" is not clear, well at least to me. What exactly you are after?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose that you are aware of the String.Split method and regular expressions.&amp;nbsp; Depending on the string variations, you need to decide which approach is better.&amp;nbsp; For instance, if your strings values always terminate with the same pattern "L=####" after a blank space, simply use the split method on white space.&amp;nbsp; If you have more variations, I will suggest to use regular expressions. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 04:38:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961030#M13591</guid>
      <dc:creator>HJohn1</dc:creator>
      <dc:date>2022-02-20T04:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961113#M13592</link>
      <description>&lt;LI-CODE lang="csharp"&gt;acText.SetDatabaseDefaults();
                acText.Position = pointRes.Value;
                acText.Height = YaziYuks;
                acText.TextString = TextVeri;
                acBlkTblRec.AppendEntity(acText);
                tr.AddNewlyCreatedDBObject(acText, true);
                tr.Commit();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;For instance, if your strings values always terminate with the same pattern "L=####" after a blank space, simply use the split method on white space&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is not a Array. only 1 DBtext object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YaziOlustur&lt;/STRONG&gt; creates only one Text at the moment. ( &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;25ø8/10 L=250&lt;/STRONG&gt;&lt;/FONT&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to create two Texts. on the same axis... (&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;25ø8/10&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;L=250&lt;/FONT&gt;&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, there is always space. How can I divide from this space?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 06:50:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961113#M13592</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-02-20T06:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961384#M13593</link>
      <description>&lt;P&gt;I have no idea who &lt;STRONG&gt;YaziOlustur&lt;/STRONG&gt; is or how his routine works.&amp;nbsp; I am simply trying to give you some pointers.&amp;nbsp; If you need to create more than one DBtext, you need to create a loop after you split the string to add the texts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt; string value = "25ø8/10 L=250";
 string[] results = value.Split(" ");

 for (int i = 0; i &amp;lt; results.Length; i++)
    {
      Create the DBtext here
    }&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 20 Feb 2022 15:28:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961384#M13593</guid>
      <dc:creator>HJohn1</dc:creator>
      <dc:date>2022-02-20T15:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961432#M13594</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/521456"&gt;@HJohn1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my previous message, I showed how the DBtext related to Create-text is created. =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; tr.AddNewlyCreatedDBObject(acText, true); //=  25ø8/10 L=250&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want to split. so it can't be split without looping?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*******&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess it won't happen... I have to find another solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 17:22:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10961432#M13594</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-02-20T17:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10963360#M13595</link>
      <description>&lt;P&gt;What is the issue with looping? Something like the following will take your textstring, split in 2, and add 2 DBText objects on the same line. The appears to be exactly what you asked for.&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;            var TextVeri = "25ø8/10 L=250";
            var strings = TextVeri.Split(' ');
            var width = 0.0;
            foreach (string s in strings)
            {
                var acText = new DBText();                
                acText.SetDatabaseDefaults();
                acText.Position = new Point3d(pointRes.Value.X + width, pointRes.Value.Y, pointRes.Value.Z);
                acText.Height = 2; //I don't know what the YaziOlustur method is 
                acText.TextString = s;
                acBlkTblRec.AppendEntity(acText);
                tr.AddNewlyCreatedDBObject(acText, true);
                width = acText.GeometricExtents.MaxPoint.X + 2; //determine amount to offset the second text in X direction
            }
            tr.Commit();
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Feb 2022 18:49:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10963360#M13595</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-02-21T18:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10964133#M13596</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;PRE&gt;determine amount to offset the second text in X direction&lt;/PRE&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes that way... only the second post has a lot of spacing... I think I can figure it out myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;25ø8/10 L=250&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The length of the spaces should be as long as the text.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 06:40:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10964133#M13596</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-02-22T06:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10966453#M13597</link>
      <description>&lt;P&gt;the 2 in my width calculation is 2 drawing units. Just make that distance smaller to decrease the spacing.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 02:42:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10966453#M13597</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-02-23T02:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Text split</title>
      <link>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10966632#M13598</link>
      <description>&lt;P&gt;Yes. I was able to solve that part. Thank you so much. &lt;span class="lia-unicode-emoji" title=":hugging_face:"&gt;🤗&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 06:56:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/text-split/m-p/10966632#M13598</guid>
      <dc:creator>k005</dc:creator>
      <dc:date>2022-02-23T06:56:37Z</dc:date>
    </item>
  </channel>
</rss>

