Heureka API .NET Documentation
Get results from Heureka objects

The API provides common results via the ApiState object, such as volume, stem density and basal area. To access results that are not provided this way, you can get results directly from a Heureka core object. For example, to get the rectreation index, thiw followoing code can be used:

 

Example: Get recreation index
Copy Code
// First, get the Heureka period index for the desired date (asuuming a projection has been done to this state)
var periodIndex = compartment.GetState(data).HeurekaPeriod;

// Get the rereation index before any treatment 
var heuRes = compartment.TreatmentUnitObject.GetResult(periodIndex);
var res  = ((RecreationData)heuRes.Before(typeof(RecreationData))[0]); // The last index [0] must be included. For RecreationData there is always only one item in the list.
var ri = res.RecreationIndex;

// Get the rereation index after treatments in the period 
res  = ((RecreationData)heuRes.After(typeof(RecreationData))[0]);
ri = res.RecreationIndex;

 

 

See Also