Zone Stamp not outputting to schedule

Home Forums Problems and solutions in GDL Lists and schedules Zone Stamp not outputting to schedule

Viewing 6 reply threads
  • Author
    Posts
    • #2315
      Derek Jackson
      Participant

      Hi,
      I’m editing the basic Zone Stamp to make quite a few changes, and all works perfectly apart from the scheduling, which fails to output my new variables.

      I have a series of lines in the 2D script that convert the basic measured and calculated areas to acres, ft2, hectares, etc.

      	area_m2 = str (area_form, Temp_GrossArea)
      	area_ft2 = str (area_form, (Temp_GrossArea*10.7639))
      	area_acre = str (area_form, (Temp_GrossArea*0.00024710538146))
      	area_hect = str (area_form, (Temp_GrossArea*0.0001))
      	calc_acre = str (area_form, (Temp_CalcArea*0.00024710538146))
      	calc_hect = str (area_form, (Temp_CalcArea*0.0001))

      I’ve then set up a series of holder parameters (as ‘Text’) in the main parameter list – so ‘area_hect’, ‘calc_acre’, etc.

      Finally, I have the lines:

      parameters area_m2 = area_m2
      parameters area_ft2 = area_ft2
      parameters area_acre = area_acre
      parameters area_hect = area_hect
      parameters calc_acre = calc_acre
      parameters calc_hect = calc_hect

      in my Master script in the hope that it will update these variables on the fly for scheduling.

      However, all scheduling just shows a blank entry for each of the parameters. I’m stumped as to what I’m doing wrong – can anyone help?

      Thanks,

      Derek

    • #2317
      Barry Kelly
      Participant

      Try doing the conversions in the master script rather than the 2D script.
      Anything you calculate in the 2D script can only be used in the 2D script and the values can’t be used to be sent back as parameters.

      Barry.

      Versions 6.5 to 22
      Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
      Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    • #2319
      Derek Jackson
      Participant

      Thanks Barry, that’s a good start – I’m now halfway there!

      When I first add a new zone to the plan, the parameters output to the schedule correctly. However, if I then edit the zone footprint, the schedule doesn’t update, although it happily reads in a second new zone.

      However, if I edit the zone footprint, then open the Zone Settings Dialogue and close it again, the schedule then updates – it’s like the schedule only registers that the parameters have changed when the Settings Dialogue is opened (or is this the only time the parameters area_m2 = area_m2 line is called?)

      For clarity, the relevant code in my Master script is:

      ! output string = 'A:' + output string + written unit
      area_m2 = AreaM2Text + area_m2 + ' sq m'
      area_ft2 = AreaFt2Text + area_ft2 + ' sq ft'
      area_acre = AcreText + area_acre + ' ac'
      area_hect = HectText + area_hect + ' ha'
      calc_acre = CalcAcText + calc_acre + ' ac'
      calc_hect = CalcHaText + calc_hect + ' ha'
      
      ! Update for scheduling
      parameters num_area_m2 = num_area_m2
      parameters cat_title = cat_title
      parameters area_m2 = area_m2
      parameters area_ft2 = area_ft2
      parameters area_acre = area_acre
      parameters area_hect = area_hect
      parameters calc_acre = calc_acre
      parameters calc_hect = calc_hect

      Any thoughts on what I need to do? It feels like it’s really close now!

      Thanks,

      Derek

    • #2327
      Gergely Fehér
      Keymaster

      Derek,
      your parameters are not refreshed, until paramscript is not running. How did you change your zones? With the update zone function, or editing the hotspots on their contour or editing them with marquee?

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

    • #2328
      Joachim Sühlo
      Participant

      Gergely,
      a question about the running of the Parameters commands:
      They are placed in the Master Script.
      Does your answer mean, that the Parameters command is only executed,
      if a parameter is changed, which applies to the Parameter Script as whole, although the command is placed in the Master Script?
      As the Master Script is executed more often, does it skip the Lines with the Parameters Commands?

      GDL Object Developer
      b-prisma
      MAC OSx 10.14

      • #2329
        Gergely Fehér
        Keymaster

        Joachim,
        Parameters commands only executed when the master script runs as a parameter script – before then paramscript itself. In all other contexts paramscript commands like parameters or values are skipped. (Just a note: in a teamwork situation, when a floorplan is drawn and master script and 2d script runs, you don’t have the right to change the object parameters. To be able to change the parameter list of an element, you need to reserve that first.)

        Gergely Fehér
        Team Leader, Library Team
        GRAPHISOFT SE

    • #2331
      Derek Jackson
      Participant

      Thanks Gergely, by updating I mean simply editing the shape of the zone contour by moving the hotspots. So does this not update the parameters? If not, how can I force an update?

      • #2332
        Gergely Fehér
        Keymaster

        Derek,
        I made a simple test object, a new zone stamp. I added a new parameter “myArea” (a realnum) to the paramlist, and text2 0, 0, myArea to the 2d script and parameters myArea = ROOM_AREA to the parameter script. With this I tested a placed zone, and if I moved any of the zone’s hotspots the area text is changed, so paramscript has run. If I edited the zone with a marquee, then the text has not changed – so in this situatuion the paramscript did not run. This second case with the marquee is a known issue, we are working on a solution for the next main version for that.
        You can force the parameter script run with opening it’s settings dialog and closing it with “Ok”.
        If you have any other workflows which changes the zone and does not change the parameters, then please report it to me. Thanks.

        Gergely Fehér
        Team Leader, Library Team
        GRAPHISOFT SE

    • #2333
      Derek Jackson
      Participant

      Thanks Gergely.

      I haven’t looked at marquee editing or any other methods, so this just refers to moving hotspots.

      I wonder if the error may be that I’ve converted the values to strings, and these don’t directly update, as they’re only translated when the settings dialogue is opened.

      However, when I tried some mathematical calculations on the ROOM_AREA parameter (eg calculating acres via area_acre2 = (ROOM_AREA*0.00024710538146), it throws up an error saying

      Operator can be used only for numeric type operands

      (area_acre2 is an undefined parameter type in the example above)

      Any help on how I can get round this?

      Thanks,

      Derek

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