<?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 REQUEST (&amp;quot;ASSOCLP_NAME&amp;quot; messing with Parameter script in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/REQUEST-quot-ASSOCLP-NAME-quot-messing-with-Parameter-script/m-p/241389#M1135</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I'm writing a label that will fill available options based on what type of element it is attached to.  I'm using a VALUES{2} command to do this.&lt;BR /&gt;
&lt;BR /&gt;
For the Object options, I'm reading the object name, then filling the options based on what object is attached.  However, for some reason, the REQUEST ("ASSOCLP_PARVALUE...) command is screwing with the VALUES{2} command in the parameter script.&lt;BR /&gt;
&lt;BR /&gt;
Even though the arrays are filling just the same, it doesn't work.&lt;BR /&gt;
&lt;BR /&gt;
Code that doesn't work:
&lt;PRE&gt;! Parameter script
VALUES{2} "surface_type" surfaceTypeIndex, surfaceTypeDesc&lt;/PRE&gt;

&lt;PRE&gt;! Master Scipt
DIM surfaceTypeDesc[], surfaceTypeIndex[], surfaceTypeValue[]
ELEM_TYPE_OBJECT	= 1
iM = 1

! Object surfaces
IF GLOB_ELEM_TYPE = ELEM_TYPE_OBJECT THEN
    isValidType = 1
    isComplex = 1		! Used to turn on manual select

    surfaceTypeDesc[iM] = "Object Override Surface"
    surfaceTypeIndex[iM] = 1
    surfaceTypeValue[surfaceTypeIndex[iM]]= SYMB_MAT
    iM=iM+1


    partName = ""
    n = REQUEST ("ASSOCLP_NAME", "", partName)


    IF partName = "19050 Window reveal" THEN
        surfaceTypeDesc[iM] = "Inner blind Surface"
        surfaceTypeIndex[iM] = 2

        n = REQUEST("ASSOCLP_PARVALUE", "blind_inner_mat", reqNameIndex, reqType, reqFlags, reqDim1, reqDim2, reqSurf)
        surfaceTypeValue[surfaceTypeIndex[iM]]= reqSurf
        iM=iM+1

        surfaceTypeDesc[iM] = "Outer blind Surface"
        surfaceTypeIndex[iM] = 3

        n = REQUEST("ASSOCLP_PARVALUE", "blind_outer_mat", reqNameIndex, reqType, reqFlags, reqDim1, reqDim2, reqSurf)
        surfaceTypeValue[surfaceTypeIndex[iM]]= reqSurf
        iM=iM+1
    ENDIF
    print surfaceTypeIndex
    print surfaceTypeDesc
    print surfaceTypeValue
ENDIF&lt;/PRE&gt;&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 24 May 2023 09:30:38 GMT</pubDate>
    <dc:creator>Bruce</dc:creator>
    <dc:date>2023-05-24T09:30:38Z</dc:date>
    <item>
      <title>REQUEST ("ASSOCLP_NAME" messing with Parameter script</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/REQUEST-quot-ASSOCLP-NAME-quot-messing-with-Parameter-script/m-p/241389#M1135</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I'm writing a label that will fill available options based on what type of element it is attached to.  I'm using a VALUES{2} command to do this.&lt;BR /&gt;
&lt;BR /&gt;
For the Object options, I'm reading the object name, then filling the options based on what object is attached.  However, for some reason, the REQUEST ("ASSOCLP_PARVALUE...) command is screwing with the VALUES{2} command in the parameter script.&lt;BR /&gt;
&lt;BR /&gt;
Even though the arrays are filling just the same, it doesn't work.&lt;BR /&gt;
&lt;BR /&gt;
Code that doesn't work:
&lt;PRE&gt;! Parameter script
VALUES{2} "surface_type" surfaceTypeIndex, surfaceTypeDesc&lt;/PRE&gt;

&lt;PRE&gt;! Master Scipt
DIM surfaceTypeDesc[], surfaceTypeIndex[], surfaceTypeValue[]
ELEM_TYPE_OBJECT	= 1
iM = 1

! Object surfaces
IF GLOB_ELEM_TYPE = ELEM_TYPE_OBJECT THEN
    isValidType = 1
    isComplex = 1		! Used to turn on manual select

    surfaceTypeDesc[iM] = "Object Override Surface"
    surfaceTypeIndex[iM] = 1
    surfaceTypeValue[surfaceTypeIndex[iM]]= SYMB_MAT
    iM=iM+1


    partName = ""
    n = REQUEST ("ASSOCLP_NAME", "", partName)


    IF partName = "19050 Window reveal" THEN
        surfaceTypeDesc[iM] = "Inner blind Surface"
        surfaceTypeIndex[iM] = 2

        n = REQUEST("ASSOCLP_PARVALUE", "blind_inner_mat", reqNameIndex, reqType, reqFlags, reqDim1, reqDim2, reqSurf)
        surfaceTypeValue[surfaceTypeIndex[iM]]= reqSurf
        iM=iM+1

        surfaceTypeDesc[iM] = "Outer blind Surface"
        surfaceTypeIndex[iM] = 3

        n = REQUEST("ASSOCLP_PARVALUE", "blind_outer_mat", reqNameIndex, reqType, reqFlags, reqDim1, reqDim2, reqSurf)
        surfaceTypeValue[surfaceTypeIndex[iM]]= reqSurf
        iM=iM+1
    ENDIF
    print surfaceTypeIndex
    print surfaceTypeDesc
    print surfaceTypeValue
ENDIF&lt;/PRE&gt;&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 May 2023 09:30:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/REQUEST-quot-ASSOCLP-NAME-quot-messing-with-Parameter-script/m-p/241389#M1135</guid>
      <dc:creator>Bruce</dc:creator>
      <dc:date>2023-05-24T09:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: REQUEST ("ASSOCLP_NAME" messing with Parameter script</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/REQUEST-quot-ASSOCLP-NAME-quot-messing-with-Parameter-script/m-p/241390#M1136</link>
      <description>Now if I just change these  two lines of code in the Master script - it works.&lt;BR /&gt;

&lt;PRE&gt;partName = "19050 Window reveal"
!		n = REQUEST ("ASSOCLP_NAME", "", partName)&lt;/PRE&gt;

&lt;BR /&gt;
The arrays surfaceTypeDesc[], surfaceTypeIndex[], surfaceTypeValue[] report the same values in both cases (as far as I can tell) - but in the first instance, I only get the option "Object Override Surface", but in the second option above, I get all three.  See attached images.&lt;BR /&gt;</description>
      <pubDate>Sat, 02 May 2020 02:22:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/REQUEST-quot-ASSOCLP-NAME-quot-messing-with-Parameter-script/m-p/241390#M1136</guid>
      <dc:creator>Bruce</dc:creator>
      <dc:date>2020-05-02T02:22:42Z</dc:date>
    </item>
  </channel>
</rss>

