GDL
About building parametric objects with GDL.

Update parameters in placed objects?

Mats Knutsson
Advocate

I have a faint memory there is a command to "force" run parameter changes in gdl objects. I'm playing with locking parameters and if I change to lock between A and B dimensions it doesn't stick on alreday placed objects. Why so?
/Mats

5 REPLIES 5
Barry Kelly
Moderator

So, you have scripted something like LOCK "A" in the parameter or master script of an object and saved it (not 'save as').

All existing instances of that object should now have parameter A locked (greyed out in interface).

Is that what you mean?

 

You have labelled your post "Library Part Maker".

Is it in particular to do with that or did you just pick a label?

 

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
Xandros
Advisor

If you have a variable in placed objects, which you would like to update to a new value, i do suggest renaming that variable in your parameters as well as in all other scripts.

AFAIK already placed objects will remember their own placed value for exampleVariable = 0.5 but will update to your new value if renamed exampleVariableNew = 0.7.

 

Or - depending on the situation - you might force your variable to take a new value within your Masterscript: exampleVariable = 0.7. But this might prove to be a too static solution

ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti

@Barry Kelly wrote:

So, you have scripted something like LOCK "A" in the parameter or master script of an object and saved it (not 'save as').

All existing instances of that object should now have parameter A locked (greyed out in interface).

Is that what you mean?

 

You have labelled your post "Library Part Maker".

Is it in particular to do with that or did you just pick a label?

 

Barry.

 


Yes about Lock "A" in the parameter scripts and then save.

See super short clip.https://youtu.be/DBSzrU-KC9E 

Library Part Maker tag was because GDL tag didn't show up...☹️

 

It is a bit sticky.

I just tried it myself.

 

I thought it might be better if LOCK was in the master script, but it doesn't seem to matter.

 

When you change the LOCK fro A to B, the object is frozen, but only on the first try to stretch it.

Try to stretch it again and it will work.

Or open the object settings, and just OK and it will stretch.

 

There is a command you can add into your Work Environment (menus or toolbars or keyboard shortcuts).

But it seems to take quite a long time to run, and that was in an almost empty template with just a few dozen objects placed.

 

BarryKelly_0-1701094007723.png

 

 

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

That's the one I was looking for. Thank Barry!