We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

User's Global Variables

Anonymous
Not applicable
Hi everyone,

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.

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.

The 2D (and only) script of the remote control is as follows:

LINE2 0, 0, lg, 0

unID = 1

HOTSPOT2 0, 0, unID, lg, 1 :unID = unID+1
HOTSPOT2 -lg, 0, unID, lg, 3 :unID = unID+1
HOTSPOT2 lg, 0, unID, lg, 2 :unID = unID+1

GLOB_USER_1 = lg

Then in the master script of the shutters I just put:

opening_ = GLOB_USER_1

opening_ being the parameter that controls the sliding bits via ADD transformations in the 3D script. The concept seems brutally simple.

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!

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!

Am I missing a trick? I obviously am, aren't I? This cannot be a bug, right?

What do you guys think?
5 REPLIES 5
Erwin Edel
Rockstar
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.

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.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Barry Kelly
Moderator
As Erwin mentioned user globals are probably not the best way to go.
Any other objects could also be using the same user global causing all sorts of problems.

MVO (Library Globals) is probably the way to go.
I think the default Archicad doors may use them for 2D and 3D opening percentages.
You could use those as an example.

It isn't as easy as a simple user global.
But from memory I think there is a problem that user globals aren't recognised in all the scripts (i.e. 3D).
I really can't remember know as it was about 12 years ago when I had the problem.
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.

I just checked and GLOB_USER variables are definitely not recognised in the 3D script.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Thank you very much for your quick response guys!

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.

I'll definitely look into this MVO thing you both mentioned.

Many thanks for your help again!
You motivated me to finish this: Library Globals

Hope it helps.
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info
Anonymous
Not applicable
Thank you so much, James

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.

Cheers