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
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 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
sinceV6
Advocate
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...
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27