<?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 User's Global Variables in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149870#M12520</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I've recently made a sliding shutter GDL object that we use on a project a couple of instances, it has a parameter for controlling whether it's open or closed. The shutter is for an arched top opening, independent from the door / window itself, consists of a fixed half round bit and two sliding leaves, all auto-scripted from the 3d window and the leaves being called in as macros in the script of the fixed bit, which's therefore the parent object.&lt;BR /&gt;
&lt;BR /&gt;
I thought it would be awesome to have a remote control for the shutters, a separate 2d object placed on the plan somewhere out of sight, which controls the value of a GLOB_USER variable by means of the user dragging a graphical hotspot and then all the shutters in the project update the same time as the remote control object is being adjusted manually.&lt;BR /&gt;
&lt;BR /&gt;
The 2D (and only) script of the remote control is as follows:&lt;BR /&gt;
&lt;BR /&gt;
LINE2 0, 0, lg, 0&lt;BR /&gt;
&lt;BR /&gt;
unID = 1&lt;BR /&gt;
&lt;BR /&gt;
HOTSPOT2 0, 0, unID, lg, 1		:unID = unID+1&lt;BR /&gt;
HOTSPOT2 -lg, 0, unID, lg, 3	:unID = unID+1&lt;BR /&gt;
HOTSPOT2 lg, 0, unID, lg, 2	:unID = unID+1&lt;BR /&gt;
&lt;BR /&gt;
GLOB_USER_1 = lg&lt;BR /&gt;
&lt;BR /&gt;
Then in the master script of the shutters I just put:&lt;BR /&gt;
&lt;BR /&gt;
opening_ = GLOB_USER_1&lt;BR /&gt;
&lt;BR /&gt;
opening_ being the parameter that controls the sliding bits via ADD transformations in the 3D script. The concept seems brutally simple.&lt;BR /&gt;
&lt;BR /&gt;
It sort of works, but in 2D only, which's genuinely weird as the plan symbol is created using the PROJECT2 command and so should show exactly what's happening in 3D. Whatever I do, the shutters remain stubbornly shut in 3D!&lt;BR /&gt;
&lt;BR /&gt;
Also, not all of the identical shutter objects follow the lead, there are some maverick ones which don't even update in plan like the rest of them do!&lt;BR /&gt;
&lt;BR /&gt;
Am I missing a trick? I obviously am, aren't I? This cannot be a bug, right?&lt;BR /&gt;
&lt;BR /&gt;
What do you guys think?&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 24 May 2023 09:44:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-24T09:44:44Z</dc:date>
    <item>
      <title>User's Global Variables</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149870#M12520</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi everyone,&lt;BR /&gt;
&lt;BR /&gt;
I've recently made a sliding shutter GDL object that we use on a project a couple of instances, it has a parameter for controlling whether it's open or closed. The shutter is for an arched top opening, independent from the door / window itself, consists of a fixed half round bit and two sliding leaves, all auto-scripted from the 3d window and the leaves being called in as macros in the script of the fixed bit, which's therefore the parent object.&lt;BR /&gt;
&lt;BR /&gt;
I thought it would be awesome to have a remote control for the shutters, a separate 2d object placed on the plan somewhere out of sight, which controls the value of a GLOB_USER variable by means of the user dragging a graphical hotspot and then all the shutters in the project update the same time as the remote control object is being adjusted manually.&lt;BR /&gt;
&lt;BR /&gt;
The 2D (and only) script of the remote control is as follows:&lt;BR /&gt;
&lt;BR /&gt;
LINE2 0, 0, lg, 0&lt;BR /&gt;
&lt;BR /&gt;
unID = 1&lt;BR /&gt;
&lt;BR /&gt;
HOTSPOT2 0, 0, unID, lg, 1		:unID = unID+1&lt;BR /&gt;
HOTSPOT2 -lg, 0, unID, lg, 3	:unID = unID+1&lt;BR /&gt;
HOTSPOT2 lg, 0, unID, lg, 2	:unID = unID+1&lt;BR /&gt;
&lt;BR /&gt;
GLOB_USER_1 = lg&lt;BR /&gt;
&lt;BR /&gt;
Then in the master script of the shutters I just put:&lt;BR /&gt;
&lt;BR /&gt;
opening_ = GLOB_USER_1&lt;BR /&gt;
&lt;BR /&gt;
opening_ being the parameter that controls the sliding bits via ADD transformations in the 3D script. The concept seems brutally simple.&lt;BR /&gt;
&lt;BR /&gt;
It sort of works, but in 2D only, which's genuinely weird as the plan symbol is created using the PROJECT2 command and so should show exactly what's happening in 3D. Whatever I do, the shutters remain stubbornly shut in 3D!&lt;BR /&gt;
&lt;BR /&gt;
Also, not all of the identical shutter objects follow the lead, there are some maverick ones which don't even update in plan like the rest of them do!&lt;BR /&gt;
&lt;BR /&gt;
Am I missing a trick? I obviously am, aren't I? This cannot be a bug, right?&lt;BR /&gt;
&lt;BR /&gt;
What do you guys think?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 May 2023 09:44:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149870#M12520</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-24T09:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: User's Global Variables</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149871#M12521</link>
      <description>Sounds like something you could try to control with Model View Options. There is an option to override opening settings in the Dutch library. Not for 3d opening angle, but I would say it is a matter of which parameter to override.&lt;BR /&gt;
&lt;BR /&gt;
I haven't tried figuring out yet how to control parameters with MVO, but I'm sure there is information out there on the many guides and help functions.</description>
      <pubDate>Thu, 27 Mar 2014 14:40:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149871#M12521</guid>
      <dc:creator>Erwin Edel</dc:creator>
      <dc:date>2014-03-27T14:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: User's Global Variables</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149872#M12522</link>
      <description>As Erwin mentioned user globals are probably not the best way to go.&lt;BR /&gt;
Any other objects could also be using the same user global causing all sorts of problems.&lt;BR /&gt;
&lt;BR /&gt;
MVO (Library Globals) is probably the way to go.&lt;BR /&gt;
I think the default Archicad doors may use them for 2D and 3D opening percentages.&lt;BR /&gt;
You could use those as an example.&lt;BR /&gt;
&lt;BR /&gt;
It isn't as easy as a simple user global.&lt;BR /&gt;
But from memory I think there is a problem that user globals aren't recognised in all the scripts (i.e. 3D).&lt;BR /&gt;
I really can't remember know as it was about 12 years ago when I had the problem.&lt;BR /&gt;
It was even before the days of Archi-talk - it was back in the old GDLtalk days - I'm sure I mentioned something about it back then.&lt;BR /&gt;
&lt;BR /&gt;
I just checked and GLOB_USER variables are definitely not recognised in the 3D script.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 27 Mar 2014 15:04:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149872#M12522</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2014-03-27T15:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: User's Global Variables</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149873#M12523</link>
      <description>Thank you very much for your quick response guys!&lt;BR /&gt;
&lt;BR /&gt;
The GDL Cookbook made the whole user GV business seem so easy, although the example objects through which it explains this feature are indeed 2D only.&lt;BR /&gt;
&lt;BR /&gt;
I'll definitely look into this MVO thing you both mentioned.&lt;BR /&gt;
&lt;BR /&gt;
Many thanks for your help again!</description>
      <pubDate>Thu, 27 Mar 2014 15:52:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149873#M12523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-27T15:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: User's Global Variables</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149874#M12524</link>
      <description>You motivated me to finish this: &lt;A href="http://www.onland.info/archives/2014/03/library_globals.php" target="_blank"&gt;Library Globals&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Hope it helps.</description>
      <pubDate>Fri, 28 Mar 2014 19:45:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149874#M12524</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2014-03-28T19:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: User's Global Variables</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149875#M12525</link>
      <description>Thank you so much, James&lt;BR /&gt;
&lt;BR /&gt;
Not only the linked article is massively useful, but the rest of your website as well! Will need to check out all the gdl related stuff on there.&lt;BR /&gt;
&lt;BR /&gt;
Cheers</description>
      <pubDate>Fri, 04 Apr 2014 15:31:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/User-s-Global-Variables/m-p/149875#M12525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-04T15:31:54Z</dc:date>
    </item>
  </channel>
</rss>

