<?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: Issue with APPLICATION_QUERY() in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Issue-with-APPLICATION-QUERY/m-p/309573#M4414</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/2000"&gt;@kuvbur&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I didn't think of concatenate it &lt;span class="lia-unicode-emoji" title=":downcast_face_with_sweat:"&gt;😓&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Oct 2021 08:34:16 GMT</pubDate>
    <dc:creator>MetalFingerz</dc:creator>
    <dc:date>2021-10-18T08:34:16Z</dc:date>
    <item>
      <title>Issue with APPLICATION_QUERY()</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Issue-with-APPLICATION-QUERY/m-p/309514#M4412</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all, the new forum layout is terrible &lt;span class="lia-unicode-emoji" title=":nauseated_face:"&gt;🤢&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, I'm having an issue with APPLICATION_QUERY() and I tried and tried solutions but to no avail so I come here for help. I have a MEP library part with two connections for water supply. I want to retrieve some info (pens, fills, surfaces) from the Systems list so I can have the piping coming out of it to look as it should.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I do not know the index of the system, I need to retrieve it and then gets some of its info. Here's what I do :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DIM SYSTEM_2[][]
S1 = 0
S2 = 0

n1 = APPLICATION_QUERY ("MEPSYSTEM", "GetMEPSystems(2)", SYSTEM_2)

FOR i = 1 TO VARDIM2(SYSTEM_2)
	IF SYSTEM_2[1][i] = ConSystem_1 THEN S1 = SYSTEM_2[1][i-1]
	IF SYSTEM_2[1][i] = ConSystem_2 THEN S2 = SYSTEM_2[1][i-1]
NEXT i

n2 = APPLICATION_QUERY ("MEPSYSTEM", "GetSystemMaterial(S1)", MEPmaterial_1)
n3 = APPLICATION_QUERY ("MEPSYSTEM", "GetSystemMaterial(S2)", MEPmaterial_2)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(For this example, I do not check if the n are &amp;gt; 0)&lt;/P&gt;
&lt;P&gt;So first query, I get all the piping systems ok. Second and third queries, I can't retrieve the SystemMaterial&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For info, the GDL reference guide defines it that way :&amp;nbsp;&lt;EM&gt;APPLICATION_QUERY (extension_name, parameter_string, variable1, variable2, ...)&lt;/EM&gt; and it seems that I can't achieve what I want because the second argument of APPLICATION_QUERY() has to be a string so it is read literally and it cannot have a variable but then what's the point ? I can never know for sure the index of the System the user will be inputing so I cannot hardcode the index for GetSystemMaterial(). I tried to have the second argument without quotes but the whole query breaks then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any workaround ? It seems to be the only solution to retrieve this info &lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt;. Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using AC24 on MacOS&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 09:17:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Issue-with-APPLICATION-QUERY/m-p/309514#M4412</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2024-09-09T09:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with APPLICATION_QUERY()</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Issue-with-APPLICATION-QUERY/m-p/309522#M4413</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;n2 = APPLICATION_QUERY ("MEPSYSTEM", "GetSystemMaterial(" + str("%.0", s1) + ")", MEPmaterial_1)&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;n2 = APPLICATION_QUERY ("MEPSYSTEM", "GetSystemMaterial(" + s1 + ")", MEPmaterial_1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 19:25:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Issue-with-APPLICATION-QUERY/m-p/309522#M4413</guid>
      <dc:creator>kuvbur</dc:creator>
      <dc:date>2021-10-17T19:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with APPLICATION_QUERY()</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Issue-with-APPLICATION-QUERY/m-p/309573#M4414</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/2000"&gt;@kuvbur&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I didn't think of concatenate it &lt;span class="lia-unicode-emoji" title=":downcast_face_with_sweat:"&gt;😓&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 08:34:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Issue-with-APPLICATION-QUERY/m-p/309573#M4414</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2021-10-18T08:34:16Z</dc:date>
    </item>
  </channel>
</rss>

