Components for walls from Wall_​​Zone_​​Border_​​Parameters

Home Forums Problems and solutions in GDL Lists and schedules Components for walls from Wall_​Zone_​Border_​Parameters

Viewing 8 reply threads
  • Author
    Posts
    • #2498

      Hello,
      I am trying to find components for walls from Wall_Zone_Border_Parameters. To begin I wrote following code.
      ——————————————————————————————-
      !Wall-Zone Border parameters
      A=REQ (“Gdl_WALLZ_LENGTH”) ! Wall-Zone border length
      B=REQ(“Gdl_WALLZ_SURF”) ! Wall-Zone border surface area
      C=REQ(“Gdl_WALLZ_DOORS_SURF”) ! Surface area of doors on Wall-Zone border
      D=REQ(“Gdl_WALLZ_DOORS_WIDTH”) ! Sum of door widths on Wall-Zone border
      E=REQ(“Gdl_WALLZ_WINDS_SURF”) !Surface area of windows on Wall-Zone border
      F=REQ(“Gdl_WALLZ_WINDS_WIDTH”) ! Sum of window widths on Wall-Zone border

      PRINT “WALL LENGTH”,Gdl_WALLZ_LENGTH,
      “WALL SURFACE”,Gdl_WALLZ_SURF,
      “DOOR SURFACE”,Gdl_WALLZ_DOORS_SURF,
      “DOOR WIDTH”,Gdl_WALLZ_DOORS_WIDTH,
      “WINDOWS SURFACE”,Gdl_WALLZ_WINDS_SURF,
      “WINDOWS WIDTH”,Gdl_WALLZ_WINDS_WIDTH
      ————————————————————————————–
      When linked to zone through criteria The report window returns
      WALL LENGTH 0 WALL SURFACE 0 DOOR SURFACE 0 DOOR WIDTH 0 WINDOWS SURFACE 0 WINDOWS WIDTH 0
      instead of real values.

      Is the code wrong?
      Is there any way to list zone related parameters?
      Will someone help?

      Thanks in advance.
      NS

    • #2506

      Hello,
      I am stuck due to this issue. Will anyone help asap.
      NS

    • #2522

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE
      A thousand thanks for early reply.
      I am aware of parameters in Zone stamps. But it becomes essential to write Property script inside the Zone.gsm to get components and resave zone.gsm. You have to repeat process at next upgrade / update form Graphisoft. Hence I was trying to write property script in a new property.gsm. Is there any way to write new script and call Zone.gsm parameters in it?

      Besides what are “Wall-Zone Border parameters” meant for?
      Please reply.
      Thanks once again.
      NS

    • #2605
      Gergely Fehér
      Keymaster

      You can create a property object, and link that property object to the zones. In the property object’s property script you can reach the zones parameters with “ASSOCLP_PARVALUE” request, and calculate anything based on that, and list with the old listing as components.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2746

      Sorry for a very delayed reply. I was ill.
      I do not know how much trouble you can take for me, but I am an architect and not a programmer.
      With “ASSOCLP_PARVALUE” I see a million possibilities, but some how I do not get success in writing proper code.
      To start with I prepared request to get manufacturer’s name of window in property object and attached that to a Window library part. Code as below. The report returns all values as zero. Failed in spite of various alternates.
      Kindly show what is wrong.
      —————————————————————————————–
      n=REQUEST (“ASSOCLP_PARVALUE”, “gs_list_manufacturer”, name_or_index, type, flags, dim1, dim2, p_values)
      print name_or_index, type, flags, dim1, dim2, p_values
      ——————————————————————————————
      Thanks in advance.
      Naraindrra

      • #2748
        Dominika Bobály
        Keymaster

        Your script should work: you have to enable “Interrupt with error messages” function in “Options/Work Environment/Model rebuild options” menu to let Print work.

        Your script worked for me in a new label object (the print popup was visible in the settings dialog, and it printed to the report window as well). However, it’s better to inicialize your return variables to avoid GDL warnings (even the dummy ones, I did not do that now):

        p_values= ""
        n = REQUEST ("ASSOCLP_PARVALUE", "gs_list_manufacturer", _dummy1, _dummy2, _dummy3, _dummy4, _dummy5, p_values)
        
        text2 0, 0, p_values

        Use text2 command to output values instead of print, even if only debugging, to make sure.

        Dominika Bobály
        Product Manager
        GRAPHISOFT SE

    • #2749

      Dominika Bobály,
      Many thanks for the reply. However it simply doesn’t work in a property object. I copied your code.
      Enclosing object file.
      Please look into asap.
      Regards,
      Naraindrra

    • #2750

      Dominika Bobály,
      It works.
      Code
      p_values= “”
      n = REQUEST (“ASSOCLP_PARVALUE”, “gs_list_manufacturer”, _dummy1, _dummy2, _dummy3, _dummy4, _dummy5, p_values)

      !print p_values
      !
      !text2 0, 0, p_values

      DESCRIPTOR p_values ![, code, keycode]

      Problem appears in Print / Text2 commands. Please find out why that happens and ask proper team to rectify.

      Regards.
      Naraindrra

    • #2760
      Gergely Fehér
      Keymaster

      Hi Naraindrra,

      Why do you want to use text2 or print in a property object? These object only used for listing, so I can’t imagine why they should use those commands.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2763

      Hi Gergely,
      This is a question with very profound lead. I need some time to answer. I need to write few pages. I will certainly do that.
      Simple answer to why I am using text2 or print in a property object is to test result at any line of my program. If there is any other way to do it kindly suggest.

      Regards,
      Naraindrra

Viewing 8 reply threads
  • The forum ‘Lists and schedules’ is closed to new topics and replies.