Page 1 of 1
saving name of equation as a string object
Posted: Thu Jan 21, 2010 1:53 am
by yoniboi
i want to build a sub that one of the input variables is an equation.
i want to output a graph object that has the same name as the equation just with the ending eq_name_graph where eq_name is the equation name.
I would think this is possible i just cant find the function for it in the help.
I am using eviews 6
Thank You
Yoni
Re: saving name of equation as a string object
Posted: Thu Jan 21, 2010 9:31 am
by EViews Gareth
This actually can't be done in EViews 6 (at least I can't think of a way). You'll have to use EViews 7, where you can use the @name data member to retrieve the name.
Re: saving name of equation as a string object
Posted: Thu Jan 21, 2010 2:00 pm
by yoniboi
another question i had was being able to loop through all the names of objects in a page (or workfile) so when i generate in a program a graph and it already exists the program crashes. I use delete a lot in the code, but if the object isnt there then the program crashes again.
i would rather put an if in a loop so it will look for the name and if it finds it then deletes it if not then moves on.
thank you
yoniboi
Re: saving name of equation as a string object
Posted: Thu Jan 21, 2010 2:43 pm
by EViews Gareth
You can use @isobject to test whether an object exists.
Re: saving name of equation as a string object
Posted: Fri Jan 22, 2010 12:32 am
by yoniboi
ok,
thanks for the help
yoniboi