<?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: Can I use Textblock within a for next? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Can-I-use-Textblock-within-a-for-next/m-p/327043#M2463</link>
    <description>&lt;DIV class=""&gt;I used to simple text, not textblocks. Though i guess you can use this method with textblock too.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;LI-CODE lang="markup"&gt;dim arr[iElement] ! for example it's an array you need to display
! i consider that each element in array is a string value (word)
! according to define text style, text has height stored in value 'textSize'

maxLength = 0.200 ! for ex. maximum lenght of row is 200 mm

rowLength = 0

for i=1 to iElement
   iLength = stw( arr[iElement] )*0.001*GLOB_SCALE
    rowLength = rowLength + iLength
    if rowLength &amp;gt; maxLength then
      add2 0, -textSize*GLOB_SCALE ! 'making' new line of text
      rowLength = iLength
   endif
   text2 0,0, arr[iElement] ! displaying current value of array
next i
​&lt;/LI-CODE&gt;&lt;BR /&gt;In that case text will form uneven rows (different length).&lt;/DIV&gt;</description>
    <pubDate>Fri, 14 Jan 2022 02:04:16 GMT</pubDate>
    <dc:creator>A_ Smith</dc:creator>
    <dc:date>2022-01-14T02:04:16Z</dc:date>
    <item>
      <title>Can I use Textblock within a for next?</title>
      <link>https://community.graphisoft.com/t5/GDL/Can-I-use-Textblock-within-a-for-next/m-p/326793#M2461</link>
      <description>&lt;P&gt;I have an array that I need to output but I need to be able to control the width of each line it outputs. I understand that you cannot have a duplicated textblock name but is there a way around this? I can almost achieve what I need with a basic text2 line but defining the width is important.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 17:17:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Can-I-use-Textblock-within-a-for-next/m-p/326793#M2461</guid>
      <dc:creator>JGoode</dc:creator>
      <dc:date>2022-01-11T17:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use Textblock within a for next?</title>
      <link>https://community.graphisoft.com/t5/GDL/Can-I-use-Textblock-within-a-for-next/m-p/326806#M2462</link>
      <description>&lt;P&gt;You need to have a number that adds 1 each next, then convert it to a string and make it part of the name, thus your name increases/changes each time.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 19:32:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Can-I-use-Textblock-within-a-for-next/m-p/326806#M2462</guid>
      <dc:creator>SenecaDesignLLC</dc:creator>
      <dc:date>2022-01-11T19:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use Textblock within a for next?</title>
      <link>https://community.graphisoft.com/t5/GDL/Can-I-use-Textblock-within-a-for-next/m-p/327043#M2463</link>
      <description>&lt;DIV class=""&gt;I used to simple text, not textblocks. Though i guess you can use this method with textblock too.&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;LI-CODE lang="markup"&gt;dim arr[iElement] ! for example it's an array you need to display
! i consider that each element in array is a string value (word)
! according to define text style, text has height stored in value 'textSize'

maxLength = 0.200 ! for ex. maximum lenght of row is 200 mm

rowLength = 0

for i=1 to iElement
   iLength = stw( arr[iElement] )*0.001*GLOB_SCALE
    rowLength = rowLength + iLength
    if rowLength &amp;gt; maxLength then
      add2 0, -textSize*GLOB_SCALE ! 'making' new line of text
      rowLength = iLength
   endif
   text2 0,0, arr[iElement] ! displaying current value of array
next i
​&lt;/LI-CODE&gt;&lt;BR /&gt;In that case text will form uneven rows (different length).&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Jan 2022 02:04:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Can-I-use-Textblock-within-a-for-next/m-p/327043#M2463</guid>
      <dc:creator>A_ Smith</dc:creator>
      <dc:date>2022-01-14T02:04:16Z</dc:date>
    </item>
  </channel>
</rss>

