Adds EN_getresultindex function to the API
See issue #546 . Also fixes a small bug in project.c.
This commit is contained in:
@@ -5,7 +5,7 @@ Attribute VB_Name = "Module1"
|
||||
'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
|
||||
'(EPANET2.DLL)
|
||||
|
||||
'Last updated on 07/18/2019
|
||||
'Last updated on 10/26/2019
|
||||
|
||||
' These are codes used by the DLL functions
|
||||
Public Const EN_ELEVATION = 0 ' Node parameters
|
||||
@@ -282,6 +282,7 @@ Public Const EN_R_IS_ACTIVE = 3
|
||||
Declare Function ENgetcount Lib "epanet2.dll" (ByVal object As Long, count As Long) As Long
|
||||
Declare Function ENgeterror Lib "epanet2.dll" (ByVal errcode As Long, ByVal errmsg As String, ByVal maxLen As Long) As Long
|
||||
Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal type_ As Long, ByRef value As Single) As Long
|
||||
Declare Function ENgetresultindex Lib "epanet2.dll" (ByVal type_ As Long, ByVal index As Long, ByRef value As Long) As Long
|
||||
|
||||
'Analysis Options Functions
|
||||
Declare Function ENgetoption Lib "epanet2.dll" (ByVal option_ As Long, value As Single) As Long
|
||||
|
||||
@@ -60,7 +60,8 @@ EXPORTS
|
||||
ENgetpremise = _ENgetpremise@36
|
||||
ENgetpumptype = _ENgetpumptype@8
|
||||
ENgetqualinfo = _ENgetqualinfo@16
|
||||
ENgetqualtype = _ENgetqualtype@8
|
||||
ENgetqualtype = _ENgetqualtype@8
|
||||
ENgetresultindex = _ENgetresultindex@12
|
||||
ENgetrule = _ENgetrule@20
|
||||
ENgetruleID = _ENgetruleID@8
|
||||
ENgetstatistic = _ENgetstatistic@8
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Authors: see AUTHORS
|
||||
Copyright: see AUTHORS
|
||||
License: see LICENSE
|
||||
Last Updated: 03/17/2019
|
||||
Last Updated: 10/26/2019
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@@ -157,6 +157,7 @@ extern "C" {
|
||||
|
||||
int DLLEXPORT ENgetstatistic(int type, EN_API_FLOAT_TYPE* value);
|
||||
|
||||
int DLLEXPORT ENgetresultindex(int type, int index, int *value);
|
||||
|
||||
/********************************************************************
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ unit epanet2;
|
||||
{ Declarations of imported procedures from the EPANET PROGRAMMERs TOOLKIT }
|
||||
{ (EPANET2.DLL) }
|
||||
|
||||
{Last updated on 7/18/19}
|
||||
{Last updated on 10/26/19}
|
||||
|
||||
interface
|
||||
|
||||
@@ -297,7 +297,8 @@ const
|
||||
function ENsetstatusreport(Code: Integer): Integer; stdcall; external EpanetLib;
|
||||
function ENgetversion(var Version: Integer): Integer; stdcall; external EpanetLib;
|
||||
function ENgeterror(Errcode: Integer; Errmsg: PAnsiChar; MaxLen: Integer): Integer; stdcall; external EpanetLib;
|
||||
function ENgetstatistic(StatType: Integer; var Value: Single): Integer; stdcall; external EpanetLib;
|
||||
function ENgetstatistic(StatType: Integer; var Value: Single): Integer; stdcall; external EpanetLib;
|
||||
function ENgetresultindex(Code: Integer; Index: Integer; var Value: Integer): Integer; stdcall; external EpanetLib;
|
||||
|
||||
{Analysis Options Functions}
|
||||
function ENgetoption(Code: Integer; var Value: Single): Integer; stdcall; external EpanetLib;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
|
||||
'(EPANET2.DLL) for use with VB.Net.
|
||||
|
||||
'Last updated on 07/18/2019
|
||||
'Last updated on 10/26/2019
|
||||
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Text
|
||||
@@ -287,6 +287,7 @@ Public Const EN_R_IS_ACTIVE = 3
|
||||
Declare Function ENgetcount Lib "epanet2.dll" (ByVal object As Int32, count As Int32) As Int32
|
||||
Declare Function ENgeterror Lib "epanet2.dll" (ByVal errcode As Int32, ByVal errmsg As String, ByVal maxLen As Int32) As Int32
|
||||
Declare Function ENgetstatistic Lib "epanet2.dll" (ByVal type_ As Int32, ByRef value As Single) As Int32
|
||||
Declare Function ENgetresultindex Lib "epanet2.dll" (ByVal type_ As Int32, ByVal index As Int32, ByRef value As Int32) As Int32
|
||||
|
||||
'Analysis Options Functions
|
||||
Declare Function ENgetoption Lib "epanet2.dll" (ByVal option As Int32, value As Single) As Int32
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Authors: see AUTHORS
|
||||
Copyright: see AUTHORS
|
||||
License: see LICENSE
|
||||
Last Updated: 07/20/2019
|
||||
Last Updated: 10/26/2019
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@@ -638,6 +638,8 @@ typedef struct Project *EN_Project;
|
||||
*/
|
||||
int DLLEXPORT EN_getstatistic(EN_Project ph, int type, double* value);
|
||||
|
||||
int DLLEXPORT EN_getresultindex(EN_Project ph, int type, int index, int *value);
|
||||
|
||||
/********************************************************************
|
||||
|
||||
Analysis Options Functions
|
||||
|
||||
Reference in New Issue
Block a user