Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Re-lock parameters

Bruce
Booster
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

http://www.brucepwalker.com

https://www.mindmeister.com/65450406



-- since v8.1 --

AC24 6004 INT Full | Windows 10 64 Pro | 2.8 GHz Intel i7-7700HQ | 32 Gb RAM | NVIDIA GeForce GTX 1060 6 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 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

Bruce
Booster
Perfect! A most excellent solution. Thanks very much!
Bruce Walker

http://www.brucepwalker.com

https://www.mindmeister.com/65450406



-- since v8.1 --

AC24 6004 INT Full | Windows 10 64 Pro | 2.8 GHz Intel i7-7700HQ | 32 Gb RAM | NVIDIA GeForce GTX 1060 6 Gb

Mario Sacco
Booster
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...
Mac Power Book M1 Max 64GB- OS X 12.2.1 - Archicad 25


www.studioarcrea.com

www.facebook.com/3DMD.3DMediaDesign

Bruce
Booster
Thanks for the heads-up & the link. Seems I'll have to look for another solution. Cheers.
Bruce Walker

http://www.brucepwalker.com

https://www.mindmeister.com/65450406



-- since v8.1 --

AC24 6004 INT Full | Windows 10 64 Pro | 2.8 GHz Intel i7-7700HQ | 32 Gb RAM | NVIDIA GeForce GTX 1060 6 Gb

Bruce
Booster
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

http://www.brucepwalker.com

https://www.mindmeister.com/65450406



-- since v8.1 --

AC24 6004 INT Full | Windows 10 64 Pro | 2.8 GHz Intel i7-7700HQ | 32 Gb RAM | NVIDIA GeForce GTX 1060 6 Gb

Mario Sacco
Booster
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 %
😉
Mac Power Book M1 Max 64GB- OS X 12.2.1 - Archicad 25


www.studioarcrea.com

www.facebook.com/3DMD.3DMediaDesign

Bruce
Booster
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

http://www.brucepwalker.com

https://www.mindmeister.com/65450406



-- since v8.1 --

AC24 6004 INT Full | Windows 10 64 Pro | 2.8 GHz Intel i7-7700HQ | 32 Gb RAM | NVIDIA GeForce GTX 1060 6 Gb

Mario Sacco
Booster
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.
Mac Power Book M1 Max 64GB- OS X 12.2.1 - Archicad 25


www.studioarcrea.com

www.facebook.com/3DMD.3DMediaDesign

Bruce
Booster
Well I don't have v19 to test it in yet, but it works just fine in v18.
Bruce Walker

http://www.brucepwalker.com

https://www.mindmeister.com/65450406



-- since v8.1 --

AC24 6004 INT Full | Windows 10 64 Pro | 2.8 GHz Intel i7-7700HQ | 32 Gb RAM | NVIDIA GeForce GTX 1060 6 Gb

Anonymous
Not applicable
In version 19 will work, in 20 - no.
Instead of the GLOB_CONTEXT, should be applied GLOB_VIEW_TYPE. Press the Check Script button in v19, and will be generate the warning in the GDL Editor.
All GLOB_ canceled, PEN_OF_RGB, MATERIAL_INFO, TEXTBLOCK_INFO - how many items will have to redo. Not very pleasant innovation in GDL.

Anonymous
Not applicable
I could not agree more with SL_GDL!
To remove context and other globals is insane!
Anyone using context or view dependant code WANTS to have objects change dependant on views!
The line of "in teamwork two people can see the object differently depending on the view" is the whole point!!!!! Not an argument for removing the option!

Barry Kelly
Moderator
No sorry my solution doesn't work in 19 - not the initial release anyway.
It is supposed to work when the next hotfix is released to give us time to change our scripts before it stops working again in 20.

But just what can we change our scripts to.
I use GLOB_CONTEXT quite a bit.
This is a classic example of how.
Or in a schedule I use it to control the 2D symbol of an object so it is not rotated/reversed just because the object was placed that way.

Can someone from GS please explain if we can no longer use GLOB_CONTEXT how can we set a parameter based on the context of what is happening to the object at that time?
i.e. how do we get around this particular problem of resetting a Boolean parameter when we are not viewing the object settings dialogue.

This would be greatly appreciated.

I agree with Kistian in that we want objects to change dependent on the views - teamwork or no teamwork.
What is the solution?

Barry.

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

sinceV6
Enthusiast
Hello.

It is, indeed, a simple but interesting issue.
As far as I can tell, objects will be able to change depending on the views, just coded differently. You will be able to use GLOB_VIEW_TYPE, GLOB_PREVIEW_MODE and GLOB_FEEDBACK_MODE to set how the object looks, but not change its stored parameters just by changing to another view type. So, in this particular case, if the user has set a value for the boolean parameter, the parameter script won't be able to change what the user has set as a stored parameter... or at least this is how I understand the GDL changes document.

I think the part about teamwork is referring to instances where an object might change stored parameters based on a view that another team member is using, something like if I'm looking at an object with 2 pieces set as an integer and a team member reserves that object, opens another type of view and because of that the object changes that parameter to 3, then it is no longer reliable what the two people are looking at. You could still code in that the object should display 3 pieces in that view or 2 in the other, but without changing the original 2 pieces set... something like that.

I can see the use for the example provided in the thread, re-locking a parameter once the dialog box closes; but don't think it will work in future versions.

Of course... I could be ENTIRELY wrong in what I've said until further and deeper information is available.

Best regards.

Laszlo Nagy
Community Admin
Community Admin
Just for reference here is the document that outlines what has changed, why and what to do:

http://download.graphisoft.com/ftp/techsupport/downloads/GDL/GDL%20changes%20in%20ArchiCAD%2019%20v1...
....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!