dmpinitcomp
dmpinitcomp |
Purpose
Synopsis
procedure dmpinitcomp(res:dmpresource, type:text)
procedure dmpinitcomp(res:dmpresource, id:text, type:text, name:text, env:text)
Arguments
res
|
The
dmpresource value to initialize.
|
||||||
id
|
The ID of the component you want to access (or empty string)
|
||||||
type
|
The type of the component you want to access (or empty string)
|
||||||
name
|
The name of the component you want to access (or empty string)
|
||||||
env
|
The lifecycle stage of the component instance you want to access (or empty string), one of:
|
Example
declarations res: dmpresource end-declarations dmpinitcomp(res,"Xpress Executor") if res.status<>DMP_OK then writeln('ERROR: ',res.lasterror) end-if
Further information
1. This procedure will initialize a
dmpresource to access another component in the same solution as the component executing the model.
2. You can pass an empty string if you don't want to specify any of the arguments, but you must specify at least one of
id,
type and
name.
3. If you specify a component type and a component of this type does not exist in the solution, this function will look for a component whose type contains the type string you specified (e.g. passing type
Xpress Insight may return a component of type
Xpress Insight 4.12 if one exists).
4. Where multiple components in the solution match the values you specified, the
dmpresource will be initialized to access an arbitrarily selected component.
5. If you don't specify a lifecycle environment, the lifecycle of the component executing the model will be used.
6. You should check the
status attribute of the
dmpresource after calling this procedure.