Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Force Parameter Text

Anonymous
Not applicable
OK, not sure if this is posible but I will give it a go.
I am in the process of creating my own multi-use door for use on future projects.
What I would like to do is force text within a parameter for use in scheduling.

For example, if my door has a vision panel, I would like another parameter to call the code VP

ie
if visionpanel = 1 then
vp_schedule = "VP"
endif

Obviously this script doesn't work. What do I need to do to get this to work.
Do I need to use the Call command?
5 REPLIES 5
Barry Kelly
Moderator
If I am on the right track here you need to firstly have a text parameter called "vp_schedule" in your parameter list.

Then in you master or parameter list you need ...

if visionpanel = 1 then
vp_schedule = "VP"
PARAMETERS vp_schedule = vp_schedule
endif

This will set the parameter value.
Now you can use this as an additional parameter in your schedules.

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
Barry Kelly
Moderator
You should also have something in the code to turn off "VP" when there is no vision panel.
So maybe something like this is better.

if visionpanel = 1 then
vp_schedule = "VP"
else
vp_schedule = ""
endif
PARAMETERS vp_schedule = vp_schedule
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
Anonymous
Not applicable
Thank you very much Barry,
That is exactly what I want.

For some reason the 'LOCK' command isn't greying out the parameter when I open the object however. No big deal though.

Thanks again, saved me banging my head against the GDL reference guide
Barry Kelly
Moderator
Tom wrote:
For some reason the 'LOCK' command isn't greying out the parameter when I open the object however. No big deal though.
In Parameter script type the following (with the quotes) ...

LOCK "vp_schedule"

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
Anonymous
Not applicable
Gosh, I must of had a brain freeze yesterday.
Thanks