The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about GDL - Doors/Windows/Objects/Stairs etc. (Example: I created an object that prints an error message in 3D all the time, please help!)

Moderators: Barry Kelly, Karl Ottenstein, LaszloNagy, ejrolon, gkmethy, Gergely Feher

User avatar
By Bruce
#247499
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?
User avatar
By Barry Kelly
#247508
Maybe you could try ...
Code: Select all
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.
User avatar
By mariosmic
#247528
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/tech ... 20v1.1.pdf
User avatar
By mariosmic
#247569
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 %
;-)
User avatar
By Bruce
#247572
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.
User avatar
By mariosmic
#247577
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.
Attachments
Screen Shot 2015-10-19 at 06.36.22.png