6.8.9 DMcob_CreateFromModel

This function can be used to create an object based on any model as instance or model.

The parameters define the model from which the newly created object is derived, as well as the parent, and the object type (instance or model) of the newly created object.

77  DM-objectid  pic 9(9)  binary value 0.
77  DM-parentid  pic 9(9)  binary value 0.
77  DM-modelid   pic 9(9)  binary value 0.

call "DMcob_CreateFromModel" using
            DM-StdArgs
            DM-objectid
            DM-parentid
            DM-modelid.

Parameters

-> DM-Options of DM-StdArgs

Folgende Optionen können angegeben werden, wobei mehrere Optionen mit oder verknüpft werden können:

Option

Meaning

0

Creates an instance.

DMF-CreateModel

Creates a model.

DMF-CreateInvisible

The newly generated object is created invisible, regardless of the setting at its Model or Default.

<- DM-objectid

In this parameter, the identifier of the newly created object is returned.

-> DM-parentid

This parameter defines the parent of the newly created object.

-> DM-modelid

This parameter defines the model from which the newly created object is derived. If it is a hierarchical model, its children are also created in the newly generated object.

Return value

DM-status of DM-StdArgs

DM-error

Object could not be created.

DM-success

Object was successfully created.

Availability

The function DMcob_CreateFromModel is available since IDM version A.06.01.g.

See also

Function DMcob_CreateObject

Built-in function create() in manual “Rule Language”

Method :create()