Value{2} and put functions please

Home Forums Problems and solutions in GDL Parameter connections Value{2} and put functions please

Viewing 3 reply threads
  • Author
    • #2144
      Kristian Bursell

      Firstly I love the Value{2} command as it allows me to use an integer parameter but make it work like a string parameter. This has been very helpful recently with auto labels referencing Building Materials so that if the BM Name is altered the label updates automatically and correctly.
      The problem I have is allowing for composites with varying numbers of skins. Forgive me I am being a bit lazy asking this question be thoroughly exploring tricky workarounds.
      currently i have the code picking up the number of skins (iSkins) and then I am writing something like this:

      if iSkins = 1 then
      Value{2} “parameter”, 1, array[1]
      if iSkins = 2 then
      Value{2} “parameter”, 1, array[1], 2, array[2]
      and so on.
      where i’d rather do it using; for n = 1 to iSKins ……put….. next n.
      but obviously this doesn’t work with the Value{2} command as it doesn’t with many other would be great if we could use get and put functions with everything.

      any workarounds?
      i haven’t tried anything else yet because.



    • #2145
      Kristian Bursell

      sorry a couple of cropped sentences above, very tired at the moment.
      I haven’t tried anything else because… i’m very busy and very tired. GDL 12hrs a day weakens the brain muscle come Friday afternoon.


    • #2146
      Wesley Marnitz

      Hi Kristian
      I agree, I have found VALUES{2} to be very useful. I have also found that you can use arrays for both the integer and the string values.
      Here is an example.
      DIM num[]
      FOR i = 1 TO VARDIM1(array)
      num[i] = i
      NEXT i
      VALUES{2} “parameter” num, array

      Bim Bakery

    • #2148
      Gergely Fehér

      Wesley posted the right solution, you can use arrays as the parameters of the values{2} command. The only limitation is that you should use array pairs with the same dimensions.
      You can combine these 2, and you can add more than one array pair to a values{2}.

      values{2} “myparam” numarray1, stringarray2, intvalue1, stringvalue1, numarray2, stringarray2

      Gergely Fehér
      Team Leader, Library Team

Viewing 3 reply threads
  • The forum ‘Parameter connections’ is closed to new topics and replies.