Error changing value in schedule

Home Forums Problems and solutions in GDL Lists and schedules Error changing value in schedule

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by  Kristian Bursell 1 day, 4 hours ago.

  • Author
    Posts
  • #4328

    Kristian Bursell
    Participant

    Some users are reporting errors in that the 2D representation (in plan window) disappears when a parameter value is edited via an Interactive Schedule. I cannot replicate the issue but have heard of it before.

    Has anyone else experience this issue and is there a known solution?

    CADSWIFT
    Australia

  • #18049

    Kristian Bursell
    Participant

    This issue has arisen again and I need to fix is. I am thankfully getting an error message now.
    The error message is reporting “Incompatible Array Dimensions” however I cannot fixed the problem.
    I use dynamic arrays extensively and
    Example of script below with the error line being “xVPanel = _xVPanel”:

    dim _xVPanel[1][]

    for i = 1 to vertpan_numb
    if i > vardim2(xVPanel) then
    _xVPanel[1][i] = .160
    else
    _xVPanel[1][i] = xVPanel[1][i]
    endif
    next i

    xVPanel = _xVPanel

    parameters xVPanel = xVPanel

    thanks,
    Kristian

    CADSWIFT
    Australia

  • #18050

    Péter Baksa
    Participant

    Hi Kristian,

    I only get this error when the array parameter is one-dimensional in the libpart editor. Change it two two-dimensional by inserting a column.

    One and two-dimensional dynamic arrays are not interchangeable.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • #18057

    Kristian Bursell
    Participant

    Thanks Péter,
    The arrays that are in the error are two-dimensional but they being generated by other arrays that are one dimensional so perhaps the trail will lead back to them.
    The object has many 1D arrays such that it will be a large job to convert them all. Is there are known reason and a possible work around, other than changing all arrays to 2D?

    CADSWIFT
    Australia

  • #18059

    Péter Baksa
    Participant

    Why are you using a two-dimensional array with the first dimension size only 1? Is that only for the example?

    Possible workaround: the parameters are dynamic arrays too. You can append items to it beyond its current size.

    si = vardim2(a2)
    if n > si then
    	for i = si + 1 to n
    		a2[1][i] = -1
    	next i
    	parameters a2 = a2
    endif

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • #18091

    Kristian Bursell
    Participant

    The reason for the 2D array with the first dimension set to 1 is only because i am using it for space between vertical frame elements, so its not necessary, its just easier for me to read.

    I will make some changes based on your advice and hopefully get the issue resolved.

    Thanks for your help

    CADSWIFT
    Australia

You must be logged in to reply to this topic.