Previous Next


DefineDefaultDistribution Method (RDKInput Object)

Description

Sets a distribution as the default distribution for an input.

Syntax

object.DefineDefaultDistribution(dist as Variant)

Arguments

dist (Required Variant) – Must be an RDKDistribution object, a BDKDistribution object, or a string. If a string, must be in standard @RISK format, for example "RiskNormal(100,10)". If dist is an object, remember that the object is copied. Thus later changes to dist after a call to DefinieDefaultDistribution will not change the default distribution of the input.

Return Value

(RDKDistribution) – the default distribution object of the input.

Example

'Make a Normal(0,1) the default distribution:
'Method 1 : As an object:
Dim dist as New RDKDistribution
With dist
    .DistType = RDKDistTypeNormal
    .Arg(1) = 0
    .Arg(2) = 1
End With
RDKApp.Inputs("myInput").DefineDefaultDistribution dist
'Method 2 : As a string:
RDKApp.Inputs("myInput").DefineDefaultDistribution "RiskNormal(0,1)"