Cape Thermo Material WrapperCopy From Material Method
Definition
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
public void CopyFromMaterial(
ICapeThermoMaterial source
)Public Sub CopyFromMaterial (
source As ICapeThermoMaterial
)Parameters
- source ICapeThermoMaterial
- Source Material Object from which stored properties will be copied.
Remarks
Before using this method, the Material Object must have been configured with the same exact list of Compounds and Phases as the source one. Otherwise, calling the method will raise an exception. There are two ways to perform the configuration: through the PME proprietary mechanisms and with CreateMaterial. Calling CreateMaterial on a Material Object S and subsequently calling CopyFromMaterial(S) on the newly created Material Object N is equivalent to the deprecated method ICapeMaterialObject.Duplicate.
The method is intended to be used by a client, for example a Unit Operation that needs a Material Object to have the same state as one of the Material Objects it has been connected to. One example is the representation of an internal stream in a distillation column.
Exceptions
| ECapeNoImpl | The operation is “not” implemented even if this method can be called for reasons of compatibility with the CAPE-OPEN standards. That is to say that the operation exists but it is not supported by the current implementation. |
| ECapeFailedInitialisation | The pre-requisites for copying the non-constant Physical Properties of the Material Object are not valid. The necessary initialisation, such as configuring the current Material with the same Compounds and Phases as the source, has not been performed or has failed. |
| ECapeOutOfResources | The physical resources necessary to copy the non-constant Physical Properties are out of limits. |
| ECapeNoMemory | The physical memory necessary to copy the non-constant Physical Properties is out of limit. |
| ECapeUnknown | The error to be raised when other error(s), specified for this operation, are not suitable. |