Array Parameter

Home Forums General discussions Array Parameter

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Daniel Virtic 7 months, 3 weeks ago.

  • Author
    Posts
  • #2828

    Daniel Virtic
    Participant

    Hi everyone,

    Please see attached.

    Any help = will be appreciated.

    Thank you.

    Daniel

    Attachments:

    AC19 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:

    AC19 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

You must be logged in to reply to this topic.