<?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 Changing parameter independently using GLOB_MODPAR_NAME in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/364985#M1646</link>
    <description>&lt;P&gt;This is only a simplified example.&lt;/P&gt;&lt;P&gt;I need modify a second parameter if a first parameter changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; used this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF GLOB_MODPAR_NAME = "k" THEN
PARAMETERS a = a*2
ENDIF&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to create a simple rectangle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RECT2 0,0,a,b&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem comes when I make changes on multiple objects.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Parameter "A" of the last object selected will be applied to all the objects.&lt;/P&gt;&lt;P&gt;I checked "Run the parameter script only once"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to have the parameter "A" modified independently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the example object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 10:56:43 GMT</pubDate>
    <dc:creator>Mario Sacco</dc:creator>
    <dc:date>2022-12-14T10:56:43Z</dc:date>
    <item>
      <title>Changing parameter independently using GLOB_MODPAR_NAME</title>
      <link>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/364985#M1646</link>
      <description>&lt;P&gt;This is only a simplified example.&lt;/P&gt;&lt;P&gt;I need modify a second parameter if a first parameter changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; used this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF GLOB_MODPAR_NAME = "k" THEN
PARAMETERS a = a*2
ENDIF&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to create a simple rectangle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RECT2 0,0,a,b&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem comes when I make changes on multiple objects.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Parameter "A" of the last object selected will be applied to all the objects.&lt;/P&gt;&lt;P&gt;I checked "Run the parameter script only once"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to have the parameter "A" modified independently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the example object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 10:56:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/364985#M1646</guid>
      <dc:creator>Mario Sacco</dc:creator>
      <dc:date>2022-12-14T10:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Changing parameter independently using GLOB_MODPAR_NAME</title>
      <link>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/364996#M1647</link>
      <description>&lt;P&gt;Firstly you should probably script it like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IF GLOB_MODPAR_NAME = "k" THEN 
	a = a*2
	PARAMETERS a = a
ENDIF
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a = a*2 will change the value of 'a' used in the scripts.&lt;/P&gt;
&lt;P&gt;PARAMETERS a = a*2 will change the value of the parameter in the parameter list, but not necessarily the value of 'a' in the scripts, until the scripts are run again and they get the new value from the parameter list.&lt;/P&gt;
&lt;P&gt;I don't quite understand it all but it is a good practice to follow.&lt;/P&gt;
&lt;P&gt;The scripts are all run multiple times and setting the parameter script to run only once will have no impact on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not that it will make a difference to what you want to do.&lt;/P&gt;
&lt;P&gt;As you have multiple objects selected, even with different 'a' values, your script is telling it to change the 'a' parameter by doubling it.&lt;/P&gt;
&lt;P&gt;Because they are all selected together, they will all change to the same 'a' value as the object settings that you are changing - as if you typed in the value for 'a' yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works fine when you have only one object selected.&lt;/P&gt;
&lt;P&gt;But when you have multiple, you are effectively re-setting them all to the same 'a' value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not quite sure how you would get around this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 06:52:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/364996#M1647</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2022-12-14T06:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Changing parameter independently using GLOB_MODPAR_NAME</title>
      <link>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/365004#M1648</link>
      <description>&lt;P&gt;Given that you are not using an IF statement after, would this not end up inconsistant as even if you select the parameter, then use the same input, it will double...?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 07:15:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/365004#M1648</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2022-12-14T07:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Changing parameter independently using GLOB_MODPAR_NAME</title>
      <link>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/365040#M1649</link>
      <description>&lt;P&gt;The logic is quite simple. A or any other parameter cannot be independently set in each object in a multiple selection. Changing a Parameter either directly or by script will be set to the same value across all selected objects.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 11:23:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/365040#M1649</guid>
      <dc:creator>DGSketcher</dc:creator>
      <dc:date>2022-12-14T11:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Changing parameter independently using GLOB_MODPAR_NAME</title>
      <link>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/366464#M1650</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/11396"&gt;@DGSketcher&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understood the logic of these&amp;nbsp;behavior.&lt;/P&gt;&lt;P&gt;I solved creating independent parameters.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 08:44:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Changing-parameter-independently-using-GLOB-MODPAR-NAME/m-p/366464#M1650</guid>
      <dc:creator>Mario Sacco</dc:creator>
      <dc:date>2023-01-02T08:44:25Z</dc:date>
    </item>
  </channel>
</rss>

