Calling a macro in a MASTER_​​GDL file

Home Forums Problems and solutions in GDL Parameter connections Calling a macro in a MASTER_​GDL file

Tagged: ,

Viewing 2 reply threads
  • Author
    Posts
    • #18467
      Nick Rogers
      Participant

      Is it possible to call a macro from a MASTER_GDL.gdl text file?

      I’d like to return a string variable from a macro into a MASTER_GDL script to set a key for the Data IO add-on.

      I had previously used the plan name request to construct the key, but that technique is no longer possible.

      From our tests, a macro call can be included in the MASTER_GDL code without raising a syntax error, but the macro is not executed when called. It seems that the MASTER_GDL is run before the general library parts are loaded/linked in memory.

      If it is not possible to call a macro from a MASTER_GDL.gdl text file, can a MASTER_GDL text file call a deterministic function in an add-on?

      *PS Making the ‘Project Info’ parameters accessible as GDL Globals would be a great GDL feature. 😀

    • #18469
      Péter Baksa
      Keymaster

      Hi Nick,

      this document says that MASTER_GDL is executed after loading the library.
      It says it can include GDL extension-specific commands. I tried with the DateTime add-on, that works. Macro calls are not listed though.

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

      • #18471
        Nick Rogers
        Participant

        Thanks Péter,

        I have carefully read that document a number of times! 😀

        Could you possibly check with the person responsible for maintaining the MASTER_GDL.gdl interpreter code whether not being able to call a ‘macro‘ from a MASTER_GDL is a feature or a bug?

        We rely on passing a ‘shared’ string variable into a MASTER_GDL file. There is no way of passing a variable into a MASTER_GDL script in AC22 & AC23 if a macro cannot be called. 🤔

        We could write an add-on to pass a variable into the script from the add-on, but I’d like to avoid it if possible.

    • #18473
      Péter Baksa
      Keymaster

      I will reply when I have an answer to that.
      Meanwhile could you describe why do you need this solution? Couldn’t a Library global work for you?

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

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