The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about using Libraries and Library Parts - Doors/Windows/Objects/Stairs etc. (Example: How can I display a Transom above my Door?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, Gergely Feher

By kyleboyd
#247754
I am wondering if it is possible in 19 to request/reference parameters from other objects. (I am building some custom labels).

Currently I can grab an object's ID using GLOB_ID, or similar. But I would like to grab a specific parameter in the object say, randomPAR. Is this possible? If so, how?

(I am just starting to use 19, even though it says AC17 in my signature)
User avatar
By SL_GDL
#247768
kyleboyd wrote:I am wondering if it is possible in 19 to request/reference parameters from other objects. (I am building some custom labels).

Currently I can grab an object's ID using GLOB_ID, or similar. But I would like to grab a specific parameter in the object say, randomPAR. Is this possible? If so, how?

(I am just starting to use 19, even though it says AC17 in my signature)
Random parametr - hardly. Predefined, then through the command ASSOCLP_PARVALUE. But it is necessary that in requested elements, have a parameters with the same names. Then in label displayed the desired parameter.
#247784
Ok, thanks, that seems to point in the right direction and indicate that what I am trying to achieve is at least possible.

But I can't get it to work. I have a custom object with the parameter TestPAR defined in the Parameters as a text parameter. In my label object, I try

re_parameter = REQUEST ("ASSOCLP_PARVALUE", "TestPAR", nameind_TEST, type_TEST, flag_TEST, dim1_TEST, dim2_TEST, val_TEST)

labelText = val_TEST

but it results in the error "Uninitialized variable
at line 13 in the 2D script of file TEST LABEL.gsm."

I have also tried substituting "ac_bottomlevel" for "TestPAR" with similar results. Can someone help?
User avatar
By SL_GDL
#247788
kyleboyd wrote: but it results in the error "Uninitialized variable
val_TEST="" !!! Initialize
re_parameter=REQUEST("ASSOCLP_PARVALUE", "TestPAR", nameind_TEST, type_TEST, flag_TEST, dim1_TEST, dim2_TEST, val_TEST)
PARAMETERS labelText=val_TEST