Where to place macro return parameters?

Home Forums Problems and solutions in GDL Object design Where to place macro return parameters?

Viewing 4 reply threads
  • Author
    Posts
    • #18062
      Tim Haering
      Participant

      Hey everyone,

      i need to return some parameter from a macro. It works fine when i place the end _reValue in the masterscript of the macro, but this keeps the macros other scripts (2D,..) from executing. Does anyone know how to solve this?

    • #18065
      Péter Baksa
      Keymaster

      Hi, place it at the end of the other script, from which you need to return it.

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

    • #18068
      Tim Haering
      Participant

      Hey Peter thanks for the answer. The macro is called from the master script of my Library object. When i place the “end _reValue” statement not in the master script of the macro but for instance in the 2D Script nothing is returned for some reason. My macro 2D Script ends with and “end” statement followed by some subroutines. Replacing the pure end statement with “end _reValue” did not work.

    • #18070
      Tim Haering
      Participant

      Ok it worked when i called the macro from the GDL object 2D script not the master script and used the end statement in the macro 2D script. I think i still have troubles understanding the “scopes” of the single scripts and in which order the are executed.

    • #18133
      Péter Baksa
      Keymaster

      It should work with the macro called from master script. You will only get the returned_parameters in the 2D context. If you need it in other contexts, also return them form the macro 3d, etc. scripts.

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

Viewing 4 reply threads
  • The forum ‘Object design’ is closed to new topics and replies.