mods with variables in command?

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

capuchin
Posts: 31
Joined: Tue Oct 15, 2019 9:06 am

mods with variables in command?

Postby capuchin » Tue Feb 21, 2023 8:51 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: mods with variables in command?

Postby EViews Gareth » Tue Feb 21, 2023 9:57 am

You're describing Add-ins, and they're documented here:
https://eviews.com/help/helpintro.html# ... in.html%23
Follow us on Twitter @IHSEViews

capuchin
Posts: 31
Joined: Tue Oct 15, 2019 9:06 am

Re: mods with variables in command?

Postby capuchin » Wed Feb 22, 2023 7:59 am

Got it, thanks. I had not previously noticed the section about the "_this" keyword.


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 5 guests