<?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 &amp;quot;swapping&amp;quot; booleans in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27887#M35649</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I have two parameters that, if one is on, the other needs to be off, and if the other is on, the (other) other needs to be off.  I want the 'turning on' of one to turn off the other and the likewise.&lt;BR /&gt;
&lt;BR /&gt;
So in my Master Script I use something like:&lt;BR /&gt;
&lt;BR /&gt;
IF tcx = 1 THEN sc = 0&lt;BR /&gt;
IF sc = 1 THEN tcx = 0&lt;BR /&gt;
&lt;BR /&gt;
But what that does for me is only one side of it.  If tcx gets turned on then sc is turned off, which is great, but then if I try and turn on sc, it won't let me and won't turn off tcx because tcx is already on and that means that sc HAS to be off.&lt;BR /&gt;
&lt;BR /&gt;
Does this code (or something similar that actually works correctly) belong in a different script? or am I not thinking this through correctly?&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 08 Aug 2005 16:00:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-08-08T16:00:15Z</dc:date>
    <item>
      <title>"swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27887#M35649</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I have two parameters that, if one is on, the other needs to be off, and if the other is on, the (other) other needs to be off.  I want the 'turning on' of one to turn off the other and the likewise.&lt;BR /&gt;
&lt;BR /&gt;
So in my Master Script I use something like:&lt;BR /&gt;
&lt;BR /&gt;
IF tcx = 1 THEN sc = 0&lt;BR /&gt;
IF sc = 1 THEN tcx = 0&lt;BR /&gt;
&lt;BR /&gt;
But what that does for me is only one side of it.  If tcx gets turned on then sc is turned off, which is great, but then if I try and turn on sc, it won't let me and won't turn off tcx because tcx is already on and that means that sc HAS to be off.&lt;BR /&gt;
&lt;BR /&gt;
Does this code (or something similar that actually works correctly) belong in a different script? or am I not thinking this through correctly?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 08 Aug 2005 16:00:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27887#M35649</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-08T16:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: "swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27888#M35650</link>
      <description>You need to incorporate GLOB_MODPAR_NAME, which is the name of the last parameter changed. It could really be in either the Master or Parameter script. I tend to put my stuff in the Parameter script, unless it is absolutely necessary to put it in the Master.&lt;BR /&gt;
&lt;BR /&gt;
For example:
&lt;PRE&gt;IF (GLOB_MODPAR_NAM = tcx) AND (tcx = 1) THEN 
sc = 0 
PARAMETERS sc= sc
ENDIF

IF (GLOB_MODPAR_NAM = sc) AND (sc = 1) THEN 
tcx = 0 
PARAMETERS  tcx = tcx
ENDIF
&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Aug 2005 16:39:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27888#M35650</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2005-08-08T16:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: "swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27889#M35651</link>
      <description>&lt;BLOCKQUOTE&gt;TomWaltz wrote:&lt;BR /&gt;
&lt;B&gt;Code:&lt;/B&gt;&lt;BR /&gt;
IF (&lt;FONT color="red"&gt;GLOB_MODPAR_NAM = tcx&lt;/FONT&gt;) AND (tcx = 1) THEN &lt;BR /&gt;
sc = 0 &lt;BR /&gt;
PARAMETERS sc= sc&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF (&lt;FONT color="red"&gt;GLOB_MODPAR_NAM = sc&lt;/FONT&gt;) AND (sc = 1) THEN &lt;BR /&gt;
tcx = 0 &lt;BR /&gt;
PARAMETERS  tcx = tcx&lt;BR /&gt;
ENDIF
&lt;/BLOCKQUOTE&gt;

Tom I know that you know, but red markeds written with mistakes! &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt;&lt;BR /&gt;
&lt;BR /&gt;
In script that you have wroten "tcx" and "sc" can also be equal(0 or 1).&lt;BR /&gt;
Correct beginning, but I think that script that sirduncan needs is:&lt;BR /&gt;
&lt;BR /&gt;
IF GLOB_MODPAR_NAME = "tcx" THEN&lt;BR /&gt;
	sc=NOT(tcx)&lt;BR /&gt;
	PARAMETERS sc=sc&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF GLOB_MODPAR_NAME = "sc" THEN&lt;BR /&gt;
	tcx=NOT(sc)&lt;BR /&gt;
	PARAMETERS tcx=tcx&lt;BR /&gt;
ENDIF</description>
      <pubDate>Mon, 08 Aug 2005 19:06:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27889#M35651</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-08T19:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: "swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27890#M35652</link>
      <description>&lt;BLOCKQUOTE&gt;In script that you have wroten "tcx" and "sc" can also be equal(0 or 1).&lt;BR /&gt;
Correct beginning, but I think that script that sirduncan needs is: &lt;/BLOCKQUOTE&gt;

You're right. I was just trying to give sirduncan the syntax to figure out the exact usage himself. Mine did not really work.</description>
      <pubDate>Mon, 08 Aug 2005 19:18:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27890#M35652</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2005-08-08T19:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: "swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27891#M35653</link>
      <description>My congratulation Tom you have now over 600 Posts!   &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_cool.gif" style="display : inline;" /&gt;</description>
      <pubDate>Mon, 08 Aug 2005 19:26:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27891#M35653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-08T19:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: "swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27892#M35654</link>
      <description>Thanks. At the rate you're going, you'll catch up with me in no time, The funny thing is how in the beginning, I asked a million questions, now I'm actually providing usable answers once in a while!</description>
      <pubDate>Mon, 08 Aug 2005 19:41:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27892#M35654</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2005-08-08T19:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: "swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27893#M35655</link>
      <description>Thanks guys - that did it.  I haven't done anything with glob variables yet so this is as good of an intro as any.  I'll have to read up on them.  Thanks again for helping get this working.&lt;BR /&gt;
&lt;BR /&gt;
So that you know, I actually used Toms code because I need to be able to have the them both off too.  Only in the event that one is on and the other is toggled on would I need to turn off the first.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.</description>
      <pubDate>Tue, 09 Aug 2005 13:45:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27893#M35655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-09T13:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: "swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27894#M35656</link>
      <description>sirduncan.&lt;BR /&gt;
&lt;BR /&gt;
if you really want to get ideas of what GDL can do for you, it's a good starting point to look over the "Global Variable" section of the manual. I've had a lot of good ideas by seeing what pieces I have in the Lego bucket.</description>
      <pubDate>Tue, 09 Aug 2005 14:15:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27894#M35656</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2005-08-09T14:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: "swapping" booleans</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27895#M35657</link>
      <description>Will do.</description>
      <pubDate>Tue, 09 Aug 2005 14:25:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/quot-swapping-quot-booleans/m-p/27895#M35657</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-09T14:25:59Z</dc:date>
    </item>
  </channel>
</rss>

