getResult doubt

Hello Mr. Dickinson. 

I write because I am having a little problem with a little software in which I am making for VBA to get SWMM results.  I am getting the SWMM .out information by the GetSwmmResult(a, b, c, i, q) function. 

for the case of (a,b,c): (2,1,2) I am getting the link 1 flow which is no the correct answer. 

also for (2,1,0) I get just zeros as answer and that is where i should get the flow. 

the other problem in that my networks has just 1 link so to get the link 1 flow i should put (2,0,0), intead of this I am being forced to introduce (2,1,2). I don't understand the occurring errors. I attach the inp files. 

What can be going on?

Red.INP

Red.out

Red.rpt

You need to be a member of SWMM 5 or SWMM or EPASWMM and SWMM5 in ICM_SWMM to add comments!

Join SWMM 5 or SWMM or EPASWMM and SWMM5 in ICM_SWMM

Email me when people reply –

Replies

  • I've manage to solve the problem. When I use a network without subcatchments and the GetResult function works as planned, but when I put subcatchments the errors come back. 

    What can be going on BOB?

  • These are the new files

    • printf("\nTime Total Total Total");
      printf("\nPeriod Rainfall Runoff Outflow");
      printf("\n====================================");
      for (i=1; i<=SWMM_Nperiods; i++)
      {
      GetSwmmResult(3, 0, 1, i, &x);
      GetSwmmResult(3, 0, 4, i, &y);
      GetSwmmResult(3, 0, 11, i, &z);
      printf("\n%6d %8.2f %8.2f %8.2f", i, x, y, z);

      are you using a pointer?  in your call?  not sure how you would do this in VBA.

      • yes, as a matter of fact i ma getting the correct info for the nodes and the subcatchement. For example for (0,0,0,i,q) ill get rainfall for the first subcatchment at time i, and the same for nodes; my only problem is in the links. 

  • Hi, Your files do work in SWMM 5 but do not seem to work in the interface guide of SWMM 5, i am still looking into this problem.  Maybe it is having just one link?

    • Ok, Ill try using more than one link, to see if that could be the problem, and ill tell you

      • I already tried with a 3 Link network and the same problem occurred. Based on the report the link ID's are: 1, 2, 3. Their binary number would be 0,1,2 respectively do to the order of appearance in the report, is this correct?

        I still don't get why is this error presents, to the the flow of the link #1 the code should be getSwmmResult(2,0,0,i,q), instead I am force to put getSwmmResult(2,1,1,i,q), both the number and variable are moved one unit. 

This reply was deleted.