Array Parameter

Home Forums General discussions Array Parameter

Tagged: 

Viewing 4 reply threads
  • Author
    Posts
    • #2828
      Daniel Virtic
      Participant

      Hi everyone,

      Please see attached.

      Any help = will be appreciated.

      Thank you.

      Daniel

      Attachments:

      AC20 USA
      •Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

    • #2836
      Gergely Fehér
      Keymaster

      Try it with the following paramscript, where “size1” and “size2” are the array size parameters and “myArray” is the array with changeable size:

      values "size1" range [1,)
      values "size2" range [1,)
       
       
      if GLOB_MODPAR_NAME = "size1" or GLOB_MODPAR_NAME = "size2" then
                      dim _tempArray [][]
                      _tempArray = myArray
       
                      dim myArray [][]
                      for ii = 1 to size1
                                      for jj = 1 to size2
                                                      if ii > vardim1(_tempArray) or jj > vardim2 (_tempArray) then
                                                                      _value = 0
                                                      else
                                                                      _value = _tempArray[ii][jj]
                                                      endif
                                                      myArray[ii][jj] = _value
                                      next jj
                      next ii
                      parameters myArray = myArray
      endif

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2837
      Gergely Fehér
      Keymaster

      By the way, this thread should be somewhere under “Problems and solutions in GDL”, not in “General discussion”.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2848
      Daniel Virtic
      Participant

      Thank you so much for all your Help – And apologize for missing the Toppic Name.

      Here is the purpose of having that array parameter. I need the user to have the possibility to change the Glass Panels based on he’s needs, if make sense.
      Please follow these Links:

      AC20 USA
      •Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

    • #3400
      Kristian Bursell
      Participant

      Hi Daniel,

      Did you resolve this successfully. I use the loop functions like Gergely described though i do it with invisible/local arrays which i use to populate the visible/parameter array as it allows the array to expand and shrink. When I started doing this a few years ago I had to do it this way to get the array to shrink.

      CADSWIFT
      Australia

Viewing 4 reply threads
  • The forum ‘General discussions’ is closed to new topics and replies.