<?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 Betreff: Multiple Texts from Parameter Array in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Multiple-Texts-from-Parameter-Array/m-p/647553#M7373</link>
    <description>&lt;P&gt;Your parameter being an array is the clue, but not in the way you might have thought:&lt;/P&gt;
&lt;P&gt;You'd need to use version 2 of the infield: &lt;CODE&gt;UI_INFIELD{2} UI_Text_Array[i], 120, 0 + (i - 1) * 20, 220, 14&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Because UI_INFIELD only works with the parameter name being an actual string. Here however, because we have an array, we cannot do that; we need to pass a reference. So put in the param name without quotes.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2025 20:24:27 GMT</pubDate>
    <dc:creator>runxel</dc:creator>
    <dc:date>2025-01-27T20:24:27Z</dc:date>
    <item>
      <title>Multiple Texts from Parameter Array</title>
      <link>https://community.graphisoft.com/t5/GDL/Multiple-Texts-from-Parameter-Array/m-p/647551#M7372</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a separate post, Jochen and AllanP showed how to use switches for arrays:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.graphisoft.com/t5/GDL/Multiple-on-off-switches-via-array-for-switching-within-UI/m-p/647254#M7358" target="_blank" rel="noopener"&gt;https://community.graphisoft.com/t5/GDL/Multiple-on-off-switches-via-array-for-switching-within-UI/m-p/647254#M7358&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to do the same with text but for some weird reason it keeps returning an error when the type is changed to Parameter type is changed ABC. Could anyone advise what I am doing wrong in my code, so confusing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Parameter Array Name:&amp;nbsp;UI_Text_Array&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;!!Masterscript, 2D, 3D, Parameters Script - all empty&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;!!UI Script:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FOR i = 1 TO 6
ui_outfield "Text Parameter Array:", 0, 0 + (i - 1) * 20, 100, 14
ui_infield UI_Text_Array[i], 120, 0 + (i - 1) * 20, 220, 14
NEXT i&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It returns the error "&lt;FONT color="#FF6600"&gt; ' ' isn't a valid parameter name&lt;/FONT&gt;" from within the interface script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From that error, I assume I haven't initialized the array. So I click on the button &lt;FONT color="#FF0000"&gt;(1)&lt;/FONT&gt; in the Parameters beside the field&amp;nbsp;UI_Text_Array to ensure it is set to array. Then in the little square box &lt;FONT color="#FF0000"&gt;(2)&lt;/FONT&gt; I add 6 fields leaving them blank &lt;FONT color="#FF0000"&gt;(3 and 4)&lt;/FONT&gt;. Is this how one initializes an array, sorry for the super simple question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached the GSM file for ease of reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks and best regards, from Matt&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 1.PNG" style="width: 721px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/82387iD7B112C318AE4390/image-dimensions/721x486?v=v2" width="721" height="486" role="button" title="Image 1.PNG" alt="Image 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 17:24:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Multiple-Texts-from-Parameter-Array/m-p/647551#M7372</guid>
      <dc:creator>GDL Enthusiast</dc:creator>
      <dc:date>2025-01-28T17:24:18Z</dc:date>
    </item>
    <item>
      <title>Betreff: Multiple Texts from Parameter Array</title>
      <link>https://community.graphisoft.com/t5/GDL/Multiple-Texts-from-Parameter-Array/m-p/647553#M7373</link>
      <description>&lt;P&gt;Your parameter being an array is the clue, but not in the way you might have thought:&lt;/P&gt;
&lt;P&gt;You'd need to use version 2 of the infield: &lt;CODE&gt;UI_INFIELD{2} UI_Text_Array[i], 120, 0 + (i - 1) * 20, 220, 14&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Because UI_INFIELD only works with the parameter name being an actual string. Here however, because we have an array, we cannot do that; we need to pass a reference. So put in the param name without quotes.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 20:24:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Multiple-Texts-from-Parameter-Array/m-p/647553#M7373</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2025-01-27T20:24:27Z</dc:date>
    </item>
    <item>
      <title>Betreff: Multiple Texts from Parameter Array</title>
      <link>https://community.graphisoft.com/t5/GDL/Multiple-Texts-from-Parameter-Array/m-p/647554#M7374</link>
      <description>&lt;P&gt;Hooray, thank you so much Runxel! It's amazing how many hours I sink into trying to get code working and how quickly you solve it, so so apreciated!!! Wishing you all the best, from Matt&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 20:31:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Multiple-Texts-from-Parameter-Array/m-p/647554#M7374</guid>
      <dc:creator>GDL Enthusiast</dc:creator>
      <dc:date>2025-01-27T20:31:22Z</dc:date>
    </item>
  </channel>
</rss>

