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:
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?
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.
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.
One of the forum moderators. Versions 6.5 to 25 Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10 Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10