Return parameters without a parameter

Home Forums Problems and solutions in GDL Parameter connections Return parameters without a parameter

Viewing 1 reply thread
  • Author
    • #3790
      Bruce Walker

      In looking through the scripts for the Built-In Section Marker, I found that one script is returning values to another without any corresponding parameters (if you want to look, it’s the values ‘t1’ & ‘t2’ in the macro “Marker Link Parameters” being returned to “Section-Elevation Marker Macro.”)

      I tried to mimic this behaviour in a couple of my scripts to avoid creating unnecessary parameters, but it doesn’t work. What’s the trick?

      AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
      NVIDIA GeForce GTX 1060 8Mb

    • #3791
      Gergely Fehér

      The returned parameters is just a “simple value list” in the specified order – it is not really “parameters”, just variables in the scripts.

      You need to declare the list of values to be returned at the end of the called macro’s script, like this:

      end value1, value2, value3

      Then in the caller object, you need to specify the variables to where you want to fill in these values:

      call “samplemacro” parameters …..
      returned_parameters variable_receives_value1, variable_receives_value2, variable_receives_value3

      I hope it helps, if not, please upload a sample which you can’t solve. (Upload in zip please, as gsm files are forbidden by the hosting service provider of this site.)

      Gergely Fehér
      Team Leader, Library Team

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