Parameter Variable Name

Home Forums General discussions Parameter Variable Name

This topic contains 3 replies, has 2 voices, and was last updated by  Barry Kelly 2 months, 1 week ago.

  • Author
    Posts
  • #18739

    Damien Lebeck
    Participant

    Is it possible to find the Parameter Variable Name through a Request Function to display in an Associative Label

  • #18740

    Barry Kelly
    Participant

    You 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 …

    https://archicad-talk.graphisoft.com/viewtopic.php?f=6&t=33434&p=174988&hilit=label+parameters+ASSOCLP_PARVALUE#p175031

    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

    • #18741

      Damien Lebeck
      Participant

      Thanks 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.

  • #18745

    Barry Kelly
    Participant

    It 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

You must be logged in to reply to this topic.