Home › Forums › Problems and solutions in GDL › Parameter connections › Calling a macro in a MASTER_GDL file
Tagged: macro, MASTER_GDL
- This topic has 3 replies, 2 voices, and was last updated 1 year, 1 month ago by
Péter Baksa.
-
AuthorPosts
-
-
November 27, 2019 at 13:20 #18467
Nick Rogers
ParticipantIs 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. 😀
-
November 28, 2019 at 09:57 #18469
Péter Baksa
KeymasterHi 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-
November 28, 2019 at 12:49 #18471
Nick Rogers
ParticipantThanks 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.
-
-
November 28, 2019 at 14:09 #18473
Péter Baksa
KeymasterI 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
-
-
AuthorPosts
- The forum ‘Parameter connections’ is closed to new topics and replies.