Function GetData

 

Function GetData( ByVal deviceHnd&, ByVal paramID&, ByRef outputVal ) as Long

 

Purpose: Reads a network or system parameter into a program variable.

Works in:      OneLiner and Power Flow.

Parameters:     

deviceHnd    [in] data object handle

paramID         [in] parameter ID code

outputVal    [out] output variable.

Return value:

1               success

0               failure

Remarks:       To read a parameter of a network object, you must first obtain the handle prior to calling this function. To read a system parameter, you can use the pre-defined handle HND_SYS. Data type of outputVal must agree with that of the parameter being read. The parameter ID code and data type are available in table 3.3.

Example:

 

If GetData( HND_SYS, SY_dBaseMVA, dVal1 ) = 0 Then GoTo HasError

Print "BASE MVA =  ", Format(dVal1,"##0.0")