Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

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

Get Parameters Using GDL?

Anonymous
Not applicable
How do I get a parameter from one GDL using onother GDL? I want to create an ID tag that uses a parameter (not ID or GLOB_ID) as it's value. How do I do that?
6 REPLIES 6
Anonymous
Not applicable
Some things are possible, others are not. You need to be more specific about what you want to do.

You can pass parameters from to a library part called as a macro using (for example):

CALL `door_knob` PARAMETERS door_knob_type = `round`, door_knob_backset = 2 3/4"

Aside from the GLOB_USER_1 through GLOB_USER_20 global parameters there is no way (AFAIK) to pass parameters back up to the calling part.

There may be some other tricks depending on exactly what you want to do.
Anonymous
Not applicable
For example, if I have a GDL with a parameter called JAYS_PARAM, and I want to use that parameter's text as the text for a label GDL that I have created myself, how do I reference JAYS_PARAM in the lable GDL?
Anonymous
Not applicable
If the library part containing JAYS_PARAM calls the label part, it can pass the parameter to it. It does appear to be possible to extract the parameter value of a library part in its associated label using the REQUEST("ASSOCLP_PARVALUE", ... function.

Look in the GDL Reference Manual, Appendix, Special Functions. It should do what you want. I haven't used it myself yet so I can't be sure of the details. I have stayed away from the label tool because of its frustrating limitations. Maybe now I'll take another look at it since this seems like a very interesting function.

Let us know how it works for you.
Anonymous
Not applicable
Well, that LOOKS like it would work. I've encountered one problem, though: I can't get Check Script to like anything I type. What I currently have in my script is:

Number = REQUEST ("ASSOCLP_PARVALUE", "Rating", ParmIndex, 4, 0, ParmDim1, ParmDim2, ParmValue)

When I Check Script it always gives me two errors:
1 - Missing variables at line....
2 - Missing parameters after function at line...

It has precisely the right number of arguments. I've tried substituting variable for the hard values. I've even added extra varialbe just to see if I could get "Missing variables..." to go away.

What am I missing?
Anonymous
Not applicable
It LOOKS correct according to the GDL manual. The manual may be wrong (it's been known to happen). Things to try:

1. Delete the first comma. Some functions don't use commas after the function name.

2. Try the first argument ("Rating") without the quotation marks.

These may be shots in the dark but are worth a try.

Has anybody out there used this function successfully?
Anonymous
Not applicable
I did a lot more experimentation and discovered that ALL of the arguments to the Request function should be variables. The way the manual is worded, I thought that I had to supply some of the values. That's why the example in my first post kept failing.

My line now reads like this:

ParmNum = REQUEST ("ASSOCLP_PARVALUE" ,"Frame_Type", Var1, Var2, Var3, Var4, Var5, ParmValue)

I'm not using any of the intermediate arguments, only ParmValue, so the variable names are lame.

Thanks for your help!