<?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: LIBRARYGLOBAL vs 2-dimension array in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252381#M2868</link>
    <description>Thanks Kristian.  I was hoping that wasn't going to be the answer... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;</description>
    <pubDate>Wed, 17 Mar 2021 22:07:50 GMT</pubDate>
    <dc:creator>Bruce</dc:creator>
    <dc:date>2021-03-17T22:07:50Z</dc:date>
    <item>
      <title>LIBRARYGLOBAL vs 2-dimension array</title>
      <link>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252379#M2866</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I'm performing a LIBRARYGLOBAL request on a 2-dimension array in my MVO.&lt;BR /&gt;&lt;BR /&gt;The MVO array parameter (call it zone_position_content) has dimensions [7][6]&lt;BR /&gt;However, when I perform the LIBRARYGLOBAL request, the returned array has dimensions [1][42]&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong? Do I have to re-shuffle the returned array to get it right?&lt;BR /&gt;&lt;BR /&gt;The 2D script in my part (a zone stamp):&lt;BR /&gt;
&lt;PRE&gt;DIM tmpZonePositionContent[][]
success = LIBRARYGLOBAL ("BW_MVO", "zone_position_content", tmpZonePositionContent)&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:45:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252379#M2866</guid>
      <dc:creator>Bruce</dc:creator>
      <dc:date>2021-09-14T07:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: LIBRARYGLOBAL vs 2-dimension array</title>
      <link>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252380#M2867</link>
      <description>I think the answer is yes, as its a "returned parameters" type call.&lt;BR /&gt;
&lt;BR /&gt;
When you call a macro and apply parameters to the macro from the master you can just force the master array on the macro array. But when your are wanting to force the macro array values on the master, you have to retrieve the values as a list (or single dimension array) and then reorganize them into you masters array.&lt;BR /&gt;
&lt;BR /&gt;
I haven't done this with library globals but I have done it with a macro I use to retrieve external data. the code looks like this:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;call "DataPort" parameters all, selector1 = "Assemb", returned_parameters _arraySize1, _arraySize2, arr_embedCClogAssembly	
for j = _arraySize1 to 1 step -1
	for k = _arraySize2 to 1 step -1
		_embedCClogAssembly&lt;J&gt;&lt;K&gt; = arr_embedCClogAssembly[(j -1)*_arraySize2 +k]
	next k
next j
embedCClogAssembly = _embedCClogAssembly
parameters embedCClogAssembly = embedCClogAssembly

&lt;/K&gt;&lt;/J&gt;&lt;/PRE&gt;

yours will be different because you are using library globals and not a macro call but the logic is the same.</description>
      <pubDate>Wed, 17 Mar 2021 21:55:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252380#M2867</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2021-03-17T21:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: LIBRARYGLOBAL vs 2-dimension array</title>
      <link>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252381#M2868</link>
      <description>Thanks Kristian.  I was hoping that wasn't going to be the answer... &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;</description>
      <pubDate>Wed, 17 Mar 2021 22:07:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252381#M2868</guid>
      <dc:creator>Bruce</dc:creator>
      <dc:date>2021-03-17T22:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: LIBRARYGLOBAL vs 2-dimension array</title>
      <link>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252382#M2869</link>
      <description>In my opinion for Libraryglobals it is different than for macros. LIBRARYGLOBAL always returns parameters that are set in the Model view options to the "Caller" without the use of Returned Parameters.&lt;BR /&gt;
For arrays this might be a bit different, because you do not only want to pass parameter values, but array dimensions as well. &lt;BR /&gt;
Why the 6 x 7 Array Dimensions are passed as 1 x 42 is a bit mysterious.&lt;BR /&gt;
I think with 1-dimensional Arrays it should work: please try to split the 2-dimensional array in different 1 dimensional arrays.</description>
      <pubDate>Thu, 18 Mar 2021 09:25:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252382#M2869</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2021-03-18T09:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: LIBRARYGLOBAL vs 2-dimension array</title>
      <link>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252383#M2870</link>
      <description>As the GDL reference manual says:&lt;BR /&gt;
"Requests (and Libraryglobal is also a request) do not handle two-dimensional arrays."&lt;BR /&gt;
&lt;BR /&gt;
So... it worked "as expected" (well, not as &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;you&lt;E&gt;&lt;/E&gt; expected, but...)</description>
      <pubDate>Thu, 18 Mar 2021 09:42:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252383#M2870</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2021-03-18T09:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: LIBRARYGLOBAL vs 2-dimension array</title>
      <link>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252384#M2871</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
It only works with dynamic arrays this way.&lt;BR /&gt;
If your MVO parameter is fixed size, you can declare a fixed array in the receiving script, and it will remain two-dimensional.&lt;BR /&gt;

&lt;PRE&gt;DIM tmpZonePositionContent[7][6]
success = LIBRARYGLOBAL ("BW_MVO", "zone_position_content", tmpZonePositionContent)&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Apr 2021 06:48:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252384#M2871</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2021-04-06T06:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: LIBRARYGLOBAL vs 2-dimension array</title>
      <link>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252385#M2872</link>
      <description>Thanks Peter.  Unfortunately, my arrays are dynamic size.  I run them through a loop after the REQUEST to reorder into 2-dimensions.  Ta.</description>
      <pubDate>Tue, 06 Apr 2021 10:28:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/LIBRARYGLOBAL-vs-2-dimension-array/m-p/252385#M2872</guid>
      <dc:creator>Bruce</dc:creator>
      <dc:date>2021-04-06T10:28:03Z</dc:date>
    </item>
  </channel>
</rss>

