Component Name Linked to a Variable

Home Forums Problems and solutions in GDL Lists and schedules Component Name Linked to a Variable

This topic contains 2 replies, has 2 voices, and was last updated by  Dominika Bobály 3 weeks, 3 days ago.

  • Author
    Posts
  • #3608

    matteo paiano
    Participant

    Good Morning,

    I’m new to GDL and to this forum too, so I know that probably my question is elementary!

    I’m creating an object and I would like to list a component named with its A e B sizes (something like ‘Panel’, A, ‘x’, B), because this way I hope to have different panels listed separately…how can I do something similar?

    Many thanks!

  • #3641

    Dominika Bobály
    Keymaster

    If I understand correctly: you have several, similar panel items, with different A-B sizes, and you want to create a list, where all panels with the same A-B size are listed under the same category.
    If yes, currently your best bet is to add a string type parameter to all such objects, and create a string value in paramscript using parameter values “A”, “B” and STR string formatting functions to convert strings from length types. Store the concatenated string value in the new parameter, lock it to avoid accidental changes, and then list this new parameter in the schedule.
    Let us know if the case is different.

    Dominika Bobály
    Library Developer, Library Team
    GRAPHISOFT SE

    • #3642

      Dominika Bobály
      Keymaster

      Example code in parameter script:
      ! ————————————————————
      _formatStr = “”
      rrr = REQUEST (“Window_door_dimension”, “”, _formatStr)

      stPanelSizesForList = STR{2}(_formatStr, A) + ” x ” + STR{2}(_formatStr, B)
      parameters stPanelSizesForList = stPanelSizesForList
      lock “stPanelSizesForList”
      ! ————————————————————

      This example formats the “A” and “B” length values according to Project Preferences/Dimensions/Door, Window and Skylight Dimensions settings in ARCHICAD.
      “stPanelSizesForList” should be a new, string type parameter in your objects.

      Dominika Bobály
      Library Developer, Library Team
      GRAPHISOFT SE

You must be logged in to reply to this topic.