Page 1 of 1

mods with variables in command?

Posted: Tue Feb 21, 2023 8:51 am
by capuchin
I have a question about mods, which I find a highly useful feature. Is it possible to create a mod such that I can add an object name to the mod command and make the mod apply itself to that object?

In other words, let's say I have a very simple program saved as a mod and titled "LINEMOD". For example, the code may be:

string gdpstring="gdp"
for %x {GDPstring}
{%x}.line
next

When I type the command, LINEMOD, I will get a line plot of series GDP in the workfile sample. Is there a way for me to write a more generalized mod such that I could type something like LINEMOD.GDP or LINEMOD.CR or LINEMOD.SALES to get a line graph of the dotted variable? If so, can you point me to some explanation on how to carry this out? If not, it would be an awesome feature.

Re: mods with variables in command?

Posted: Tue Feb 21, 2023 9:57 am
by EViews Gareth
You're describing Add-ins, and they're documented here:
https://eviews.com/help/helpintro.html# ... in.html%23

Re: mods with variables in command?

Posted: Wed Feb 22, 2023 7:59 am
by capuchin
Got it, thanks. I had not previously noticed the section about the "_this" keyword.