Home › Forums › General discussions › Parameter Variable Name
- This topic has 4 replies, 2 voices, and was last updated 4 years, 8 months ago by
Damien Lebeck.
-
AuthorPosts
-
-
April 29, 2020 at 00:03 #18739
Damien Lebeck
ParticipantIs it possible to find the Parameter Variable Name through a Request Function to display in an Associative Label
-
April 29, 2020 at 03:31 #18740
Barry Kelly
ParticipantYou can use …
n = REQUEST ("ASSOCLP_PARVALUE", expr, name_or_index, type, flags, dim1, dim2, p_values)
Or
n = REQUEST ("ASSOCLP_PARVALUE_WITH_DESCRIPTION", expr, name_or_index, type, flags, dim1, dim2, p_values_and_descriptions)
But the problem is you need to know the parameter name or index you want before you can request it – which defeats the purpose of requesting it?
To label all parameters of an object you might want to look at this …
Barry.
Versions 6.5 to 22
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit-
April 29, 2020 at 06:09 #18741
Damien Lebeck
ParticipantThanks for getting back to me Barry
I probably should have explained myself a bit better, we a trying to default the parameters of a locked library part with an API, we can get the variables through the the subtype menu but it is a bit hit & miss linking it to the parameter name. From what I am seeing the request functions you suggested using will give me the values of the parameter name, unless I am missing something.
-
-
April 29, 2020 at 06:44 #18745
Barry Kelly
ParticipantIt will give you the parameter name if you know the index, and it will give you the index if you know the name.
It will also give you other information such as parameter type, value and description.The example I linked to uses a range of index numbers to list all of the parameter names for those numbers.
1 = A (length)
2 = B (width)
3 = ZZYZX (height)I believe the index number is just the order that they are in the parameter list.
So if you know the position of the parameter in the list, you can use its index number to get the parameter name (and value, description, etc.).But if you are trying to do this by API then you will need to ask in the Developer section of Archicad Talk.
Barry.
Versions 6.5 to 22
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit
-
-
AuthorPosts
- The forum ‘General discussions’ is closed to new topics and replies.