ICape UnitValidate Method
Definition
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
[DispIdAttribute(4)]
bool Validate(
ref string message
)<DispIdAttribute(4)>
Function Validate (
ByRef message As String
) As BooleanParameters
- message String
- Reference to a string that will conain a message regarding the validation of the parameter.
Return Value
Booleantrue, if the unit is valid.
false, if the unit is not valid.
Remarks
Sets the flag that indicates whether the Flowsheet Unit is valid by validating the ports and parameters of the Flowsheet Unit. For example, this method could check that all mandatory ports have connections and that the values of all parameters are within bounds.
Note that the Simulation Executive can call the Validate routine at any time, in particular it may be called before the executive is ready to call the Calculate method. This means that Material Objects connected to unit ports may not be correctly configured when Validate is called. The recommended approach is for this method to validate parameters and ports but not Material Object configuration. A second level of validation to check Material Objects can be implemented as part of Calculate, when it is reasonable to expect that the Material Objects connected to ports will be correctly configured.
Exceptions
| ECapeUnknown | The error to be raised when other error(s), specified for this operation, are not suitable. |
| ECapeBadCOParameter | ECapeBadCOParameter |
| ECapeBadInvOrder | ECapeBadInvOrder |