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.

Re-lock parameters

Bruce
Advisor
I have a bunch of parameters that I don't really want the user to edit...but on the off-chance that they need to, I want to allow that.

So, I have created a menu in the parameters list, but have locked them all. A boolean parameter allows the user to unlock these for editing.

My question: how do I automatically re-lock these parameters when the user exits the settings window?
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
14 REPLIES 14
Barry Kelly
Moderator
Maybe you could try ...
if GLOB_CONTEXT <> 5 then
Boolean_parameter = 1
Parameters Boolean_parameter = Boolean_parameter
endif
That way as soon as to close the object settings the lock parameter should get turned on again.

I haven't tested this but it might work.

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
Bruce
Advisor
Perfect! A most excellent solution. Thanks very much!
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Mario Sacco
Expert
Beware the use of global, it's a "Deprecated Global Variables".
If you use it in v19, Archicad will not benefit of predictive computation.
In v20 GLOB_CONTEXT used in parameters script or master script will have always the value 2.

http://download.graphisoft.com/ftp/techsupport/downloads/GDL/GDL%20changes%20in%20ArchiCAD%2019%20v1...
MacBook M1 Max 64GB- OS X 12.2.1 - Archicad 27
https://www.archiradar.it/en/
Bruce
Advisor
Thanks for the heads-up & the link. Seems I'll have to look for another solution. Cheers.
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Bruce
Advisor
Turns out it only affects the parameter script (as you mentioned). If I move the GLOB query into the Master Script, it should still work.

Cheers!
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Mario Sacco
Expert
Bruce wrote:
Turns out it only affects the parameter script (as you mentioned). If I move the GLOB query into the Master Script, it should still work.

Cheers!
If you use PARAMETERS command in master script it works as parameters script. It's not written, but I'm quite sure it's so.
The master script to work fine must not have PARAMETERS command.
I'm sure 95 %
😉
MacBook M1 Max 64GB- OS X 12.2.1 - Archicad 27
https://www.archiradar.it/en/
Bruce
Advisor
In the master script I put:
IF GLOB_CONTEXT <> 5 THEN Boolean_parameter = 1

In the parameter script I put:
PARAMETERS Boolean_parameter = Boolean_parameter


Seems to work just fine. Haven't tested it in v19 yet.
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Mario Sacco
Expert
Bruce wrote:
In the master script I put:
IF GLOB_CONTEXT <> 5 THEN Boolean_parameter = 1

In the parameter script I put:
PARAMETERS Boolean_parameter = Boolean_parameter


Seems to work just fine. Haven't tested it in v19 yet.
It's not simple.....
The parameter Boolean_parameter in PARAMETERS script depend from a set in master script; it makes master script working as parameter script.

Let me know your try, It's a huge problem for many GDL developer.
MacBook M1 Max 64GB- OS X 12.2.1 - Archicad 27
https://www.archiradar.it/en/
Bruce
Advisor
Well I don't have v19 to test it in yet, but it works just fine in v18.
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb