After the kind help with my earlier problem I am stuck at the last bit! I have two models which should give similar results but do not. I want to copy one equation at a time across from one model to the other, solve it and see if a key variable changes (basically to find which equation is making the difference). I was feeling pleased with myself (I'm new to this) in that I could copy the equations across one by one and solve. But I need to recompile the model each time before I solve it to make the copied across equation have an effect. Can I do that automatically? Code below:
' create table for the dynamic results
wfselect "UKMOD_CLIENT(JUN3)_2012"
%tabname = "a_a_eqntest"
if @isobject(%tabname) = 1 then
delete a_a_eqntest
endif
table {%tabname}
!rowcounter=1
wfselect "UKMOD_CLIENT(JUN3)_2014"
%eqlist=@wlookup("*","equation") 'make a list of all equations in workfile
wfselect "UKMOD_CLIENT(JUN3)_2012"
'for !i=1 to @wcount(%eqlist) 'cycle through the list one at a time
for !i=1 to @wcount(%eqlist)
%eq = @word(%eqlist,!i) 'current equation name
copy(/o) "UKMOD_CLIENT(JUN3)_2014"::ukmod\{%eq} "UKMOD_CLIENT(JUN3)_2012"::ukmod\
smpl 2015 2025
' NEED TO RECOMPILE HERE!
solve a_a_ukmod
smpl 1950 2025
{%tabname}(!rowcounter,1) = GDPV_0(66)/GDPV_0(65)
!rowcounter = !rowcounter+1
next
recompiling in code
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Re: recompiling in code
Silly me!! I tried .update and left a space before the dot! Sorted, sorry for wasting time!
Who is online
Users browsing this forum: No registered users and 2 guests
