From 982ff903e376ada54289db92e9f9f606f96ea451 Mon Sep 17 00:00:00 2001 From: Marios Kyriakou Date: Sun, 23 Sep 2018 19:41:27 +0300 Subject: [PATCH] add option EN_HEADLOSSFORM in function ENgetoption --- include/epanet2.bas | 1 + include/epanet2.h | 3 ++- include/epanet2.vb | 2 ++ src/epanet.c | 5 ++++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/epanet2.bas b/include/epanet2.bas index da0f66e..c0daa91 100644 --- a/include/epanet2.bas +++ b/include/epanet2.bas @@ -139,6 +139,7 @@ Public Const EN_DEMANDMULT = 4 Public Const EN_HEADERROR = 5 Public Const EN_FLOWCHANGE = 6 Public Const EN_DEMANDDEFPAT = 7 +Public Const EN_HEADLOSSFORM = 8 Public Const EN_LOWLEVEL = 0 ' Control types Public Const EN_HILEVEL = 1 diff --git a/include/epanet2.h b/include/epanet2.h index c7ccf1e..996f681 100644 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -226,7 +226,8 @@ typedef enum { EN_DEMANDMULT = 4, EN_HEADERROR = 5, EN_FLOWCHANGE = 6, - EN_DEMANDDEFPAT = 7 + EN_DEMANDDEFPAT = 7, + EN_HEADLOSSFORM = 8 } EN_Option; typedef enum { diff --git a/include/epanet2.vb b/include/epanet2.vb index 069db45..d751762 100644 --- a/include/epanet2.vb +++ b/include/epanet2.vb @@ -123,6 +123,8 @@ Public Const EN_EMITEXPON = 3 Public Const EN_DEMANDMULT = 4 Public Const EN_HEADERROR = 5 Public Const EN_FLOWCHANGE = 6 +Public Const EN_DEMANDDEFPAT = 7 +Public Const EN_HEADLOSSFORM = 8 Public Const EN_LOWLEVEL = 0 ' Control types Public Const EN_HILEVEL = 1 diff --git a/src/epanet.c b/src/epanet.c index 2776daf..82d7206 100644 --- a/src/epanet.c +++ b/src/epanet.c @@ -1536,7 +1536,10 @@ int DLLEXPORT EN_getoption(EN_ProjectHandle ph, EN_Option code, case EN_DEMANDDEFPAT: v = hyd->DefPat; break; - + case EN_HEADLOSSFORM: + v = hyd->Formflag; + break; + default: return set_error(pr->error_handle, 251); }