<?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: String Arrays in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21168#M31165</link>
    <description>&lt;BLOCKQUOTE&gt;oreopoulos wrote:&lt;BR /&gt;If (trigger = true ) then trigger=false&lt;BR /&gt;
Else trigger=true&lt;/BLOCKQUOTE&gt;

This sounds like the liar's paradox (from ancient Greece as I recall) &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
    <pubDate>Tue, 10 Apr 2007 14:20:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-04-10T14:20:51Z</dc:date>
    <item>
      <title>String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21153#M31150</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I have programmed some objects in previous versions of AC and didn't have this problem before.&lt;BR /&gt;
&lt;BR /&gt;
I wanted to create an array that a user could use to input some 3 character variables.  &lt;BR /&gt;
&lt;BR /&gt;
If I dimension the variable (I.e., DIM wlunit [10][10] or even DIM wlunit [][] in the Master Script, the user cannot enter any values. In the past, I was able to initialize the array in the Master script and then the user would be allowed to change the values. Now I cannot initialize the array or dimension it.&lt;BR /&gt;
&lt;BR /&gt;
A part created in AC9 (or was it AC8 that was then saved in AC9) with an array. It has an initialized array and I can change the parameters later in the object setting dialog box.&lt;BR /&gt;
&lt;BR /&gt;
Is there a correct way to do it? It would be nice to be able to initialize my array.&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 31 Mar 2007 01:12:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21153#M31150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T01:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21154#M31151</link>
      <description>Phill,&lt;BR /&gt;
This may be way off base but, have you declared&lt;BR /&gt;
the array once in the parameter list and then&lt;BR /&gt;
the same array again in the master script ?&lt;BR /&gt;
David Nicholson-Cole discovered that this&lt;BR /&gt;
worked in versions prior to AC 8.0 but&lt;BR /&gt;
did not work from 8.0 onward.&lt;BR /&gt;
You declare and initialize the array once &lt;BR /&gt;
in the parameter list and the user can change the values.&lt;BR /&gt;
&lt;BR /&gt;
Sorry if this has nothing to do with your issue.&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Sat, 31 Mar 2007 04:47:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21154#M31151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T04:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21155#M31152</link>
      <description>Peter,&lt;BR /&gt;
Thanks for the suggestion. I think you did help me on one thing because I thought about using a dynamic array (correct term?) with an unspecified size but then the array didn't show up in the parameter list and therefore there wasn't any way for the user to enter any information. I added the array in the parameter list and then discovered I had to eliminate the DIM statement.&lt;BR /&gt;
&lt;BR /&gt;
If I declare the array in the parameter list, how do I initialize the array? I will try a few things.&lt;BR /&gt;
&lt;BR /&gt;
I may post something to gdl-talk if I can find the link.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again</description>
      <pubDate>Sat, 31 Mar 2007 05:28:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21155#M31152</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T05:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21156#M31153</link>
      <description>You can assign values to the array with the PARAMETERS statement.&lt;BR /&gt;
&lt;BR /&gt;
I often use a FOR loop such as:&lt;BR /&gt;
&lt;BR /&gt;
FOR i = 1 TO whatever&lt;BR /&gt;
PARAMETERS array_1&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt; = something&lt;BR /&gt;
NEXT i&lt;BR /&gt;
&lt;BR /&gt;
Naturally you have to enclose this in some conditional statement (with GLOB_MODPAR_NAME or such) or it will constantly override any user input.</description>
      <pubDate>Sat, 31 Mar 2007 16:09:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21156#M31153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T16:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21157#M31154</link>
      <description>Matthew,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the hint. I have never used the GLOBAL_MODPAR_NAME in the past except to tinker but I understand the concept and will try that.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Sat, 31 Mar 2007 18:06:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21157#M31154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T18:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21158#M31155</link>
      <description>Phil,&lt;BR /&gt;
The way you initialize a parameter list array is the following.&lt;BR /&gt;
Select the variable type in the usual way (length, pen, text, etc).&lt;BR /&gt;
Push the array icon button and the array opens but it is a one&lt;BR /&gt;
dimensional array with one row and one column. &lt;BR /&gt;
To get more than one row select the row number &lt;BR /&gt;
which is initially 1 and then push the "insert" button &lt;BR /&gt;
at the bottom of the dialog as many time as needed.&lt;BR /&gt;
To get more columns, select the first column number and&lt;BR /&gt;
press the "insert" button and more columns will be created.&lt;BR /&gt;
After you have opened the array dialog for the first time&lt;BR /&gt;
the only way you can open it again is to use the "Set" button&lt;BR /&gt;
which comes available if you click on the parameter.&lt;BR /&gt;
After you have set up your rows and columns you&lt;BR /&gt;
can initialize the values you want.&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Sat, 31 Mar 2007 19:21:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21158#M31155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T19:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21159#M31156</link>
      <description>Thanks for responding Peter.&lt;BR /&gt;
&lt;BR /&gt;
I had created the array as you described but perhaps I am not making myself clear. Assuming I have created a 10x10 array in the parameters list and want to initialize all of the values to "" (null) inside the GDL object.&lt;BR /&gt;
&lt;BR /&gt;
If I use a  FOR/NEXT loop to initialize the array, the user is not able to change the values in the object properties dialog box. I guess I need to use the GLOB_MODPAR_NAME in a conditional statement? I didn't have to do this in the past but...&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
Phil</description>
      <pubDate>Sat, 31 Mar 2007 19:48:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21159#M31156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T19:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21160#M31157</link>
      <description>Phil,&lt;BR /&gt;
I was just playing around with the array parameter&lt;BR /&gt;
and after the rows and columns are created all&lt;BR /&gt;
of the values are "null" or blank by default.&lt;BR /&gt;
As far as I can tell this does not change until&lt;BR /&gt;
you or the user fills in the cells with characters.&lt;BR /&gt;
I will check again.&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Sat, 31 Mar 2007 20:07:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21160#M31157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T20:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21161#M31158</link>
      <description>I agree that the array gets created as nulls but in the process of testing my part, values get put into the array. I was hoping I could use a FOR/NEXT loop to empty them out but still have the user input their values later. &lt;BR /&gt;
&lt;BR /&gt;
As I said it worked in previous versions of AC and doesn't now so I just want to know if there is a way to do it properly.&lt;BR /&gt;
&lt;BR /&gt;
Phil</description>
      <pubDate>Sat, 31 Mar 2007 20:20:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21161#M31158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T20:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21162#M31159</link>
      <description>Phil,&lt;BR /&gt;
I just checked again and indeed all the cells created&lt;BR /&gt;
when I make the rows and columns I want are blank by default.&lt;BR /&gt;
I saved the object, inserted an instance in the plan, selected it,&lt;BR /&gt;
opened the settings dialog, and opened the array parameter&lt;BR /&gt;
dialog and all the cells were blank.&lt;BR /&gt;
I inserted some characters in a few of the blank cells, hit OK&lt;BR /&gt;
and returned to the plan. I selected the object again&lt;BR /&gt;
and opened  it's setting dialog and checked to see&lt;BR /&gt;
if the changes I made had held. They did.&lt;BR /&gt;
I am sorry. I am clearly missing something.&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Sat, 31 Mar 2007 20:28:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21162#M31159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T20:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21163#M31160</link>
      <description>Phil,&lt;BR /&gt;
I just read your last post.&lt;BR /&gt;
I think I now know what your getting at.&lt;BR /&gt;
You want to have some sort of "re-set" function.&lt;BR /&gt;
We will have to think about that one.&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Sat, 31 Mar 2007 20:32:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21163#M31160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-31T20:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21164#M31161</link>
      <description>Phil,&lt;BR /&gt;
I think that a bigger picture of what you are trying to achieve with your object will help us understand your problem better.</description>
      <pubDate>Sun, 01 Apr 2007 04:44:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21164#M31161</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2007-04-01T04:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21165#M31162</link>
      <description>&lt;BLOCKQUOTE&gt;pfeinberg wrote:&lt;BR /&gt;I agree that the array gets created as nulls but in the process of testing my part, values get put into the array. I was hoping I could use a FOR/NEXT loop to empty them out but still have the user input their values later. &lt;BR /&gt;
&lt;BR /&gt;
As I said it worked in previous versions of AC and doesn't now so I just want to know if there is a way to do it properly.&lt;BR /&gt;
&lt;BR /&gt;
Phil&lt;/BLOCKQUOTE&gt;

If all you want to do is reset the values to defaults after editing, just run the FOR/NEXT loop and then comment the code before saving. You can also use this to create initial non-zero values. In fact, I find this easier than entering the values manually in the parameters list (seriously bad interface IMHO).&lt;BR /&gt;
&lt;BR /&gt;
The user can always reset all the parameters to defaults by switching to another part and back, so all the IF/THEN and GLOB_MODPAR_NAME tricks are only needed for a partial reset or to reinitialize for changed conditions.</description>
      <pubDate>Mon, 02 Apr 2007 22:26:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21165#M31162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-02T22:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21166#M31163</link>
      <description>Reset is very easy to implement.&lt;BR /&gt;
&lt;BR /&gt;
create a parameter says "reset_all".&lt;BR /&gt;
&lt;BR /&gt;
!-----------------script--------------------&lt;BR /&gt;
&lt;BR /&gt;
IF reset_all THEN&lt;BR /&gt;
&lt;BR /&gt;
  FOR i=1 TO VARDIM1(array)&lt;BR /&gt;
      FOR j=1 TO VARDIM2(array)&lt;BR /&gt;
          PARAMETERS array&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;J&gt;="Whatever Values"&lt;BR /&gt;
      NEXT i&lt;BR /&gt;
  NEXT j&lt;BR /&gt;
  PARAMETERS reset_all=0&lt;BR /&gt;
&lt;BR /&gt;
ENDIF&lt;BR /&gt;
!------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
Hope this help!&lt;/J&gt;</description>
      <pubDate>Tue, 03 Apr 2007 03:49:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21166#M31163</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2007-04-03T03:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21167#M31164</link>
      <description>If you want to create an initiallization part do the following.&lt;BR /&gt;
Create a variable named for example trigger.&lt;BR /&gt;
&lt;BR /&gt;
In the master script have a simple code line such as (not gdl code but metacode)&lt;BR /&gt;
&lt;BR /&gt;
If (trigger = true ) then trigger=false&lt;BR /&gt;
Else trigger=true  &lt;BR /&gt;
&lt;BR /&gt;
That way you trigger the  GLOB_MODPAR_NAME to be set to trigger &lt;BR /&gt;
&lt;BR /&gt;
then using the GLOB_MODPAR_NAME in the parameters section you can create a code to handle when the trigger parameter changes. Put there all the initialisation code. Simple as that.</description>
      <pubDate>Tue, 10 Apr 2007 08:42:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21167#M31164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-10T08:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21168#M31165</link>
      <description>&lt;BLOCKQUOTE&gt;oreopoulos wrote:&lt;BR /&gt;If (trigger = true ) then trigger=false&lt;BR /&gt;
Else trigger=true&lt;/BLOCKQUOTE&gt;

This sounds like the liar's paradox (from ancient Greece as I recall) &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;</description>
      <pubDate>Tue, 10 Apr 2007 14:20:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21168#M31165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-10T14:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: String Arrays</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21169#M31166</link>
      <description>Not exacly &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;&lt;BR /&gt;
&lt;BR /&gt;
This is executed once and just changes the state of the boolean variable.&lt;BR /&gt;
&lt;BR /&gt;
The paradox you talk goes like this: (the zinon paradox)&lt;BR /&gt;
&lt;BR /&gt;
I am a man and i always tell the truth and i say i am lying.&lt;BR /&gt;
&lt;BR /&gt;
This is a paradox caused by selfreferenced sentenced. Such logical sentences are not valid in mathematical first order logic.&lt;BR /&gt;
&lt;BR /&gt;
But ofcourse the code above has nothing to do with that</description>
      <pubDate>Tue, 10 Apr 2007 16:58:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/String-Arrays/m-p/21169#M31166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-10T16:58:28Z</dc:date>
    </item>
  </channel>
</rss>

