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