xpxConditionalDeepCopyInstancesEX

FUNCTION xpxConditionalDeepCopyInstancesEx(sourceInstances     : AGGREGATE OF GENERIC;
                                           modelId             : GENERIC;
                                           options             : INTEGER;     
                                           include_exclude     : AGGREGATE OF GENERIC; 
                                           VAR newInstances    : AGGREGATE OF GENERIC; 
                                           instanceContainerId : GENERIC;     
                                           rolesToCopy         : AGGREGATE OF GENERIC; 
                                           noContainerRoles    : AGGREGATE OF GENERIC) 
                                           status              : INTEGER;
 

The xpxConditionalDeepCopyInstancesEx function copies an instance graph within one data model or from one data model to another. The source instance graph consists of all instances that are directly or indirectly used by the source instance. The target instance(s) will implicitly be created, hence copy between existing instances cannot be performed by this operation. Optionally this operation can copy a partial instance graph, one complete or one partial instance. The data model locating the source instance must be open for read access and the target data model must be open for write access, before this operation can be successfully performed.

When copying objects (entity instances & aggregate instances) from  one model to another model, the actual objects must be "copied" from the source model into the target model. Copied in this context means that new entity instances/aggregate instances have to be created in the target model and then the "primitive attribute/aggregate values" have to be assigned from the source objects to the new created objects in the target model. Hence, "normal" assignment statements cannot be used for this purpose. An assignment operation will only "copy" the InstanceId of the actual object resulting in "invalid InstanceId in target model".

The "ROLES" arguments in this function should be specified without the "EXPRESS_SCHEMA_NAME." part as the schema is implicitly uniquely specified by the actual model.

Examples of legal"ROLES" arguments for these functions:

'IFCROOT.GLOBALID'                             

'IFCROOT.NAME'                                  

'IFCOBJECTDEFINITION.DECOMPOSES'

'IFCBUILDINGSTOREY.ELEVATION'

Arguments


1TypeNameComment
2AGGREGATE OF GENERICsourceInstancesAn aggregate of numeric instanceIDs that uniquely identifies the instances to be copied in the EDMdatabase
3GENERICmodelId A numeric modelID that uniquely identifies the data model locating the target instance(s). This target model must be a population of the same schema as the model that locates the <sourceInstances>
4INTEGERoptions see below
5AGGREGATE OF GENERICinclude_exclude Array of instances or instance types (entities). The content is dependent of the value of the <options> argument. An instanceID = 0 terminates the <exclude_or_include> array
6AGGREGATE OF GENERICnewInstance A variable that will receive an aggregate of numeric instanceIDs that will uniquely identify the created instances (target instances) in the EDMdatabase
7GENERICinstanceContainerId 
8AGGREGATE OF GENERICrolesToCopy 
9AGGREGATE OF GENERICnoContainerRoles 

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_XPX_Return_Value'.

Options


OptionComment

INCLUDE_TYPES

Only instances of the type specified in the <exclude_or_include> argument will be copied. When the SUBTYPES options is set, additionally instances that are subtypes of the specified types in <exclude_or_include> argument can be copied. The content of the <exclude_or_include> argument must be an array of GENERIC, each defining an instance type. A SdaiEntity with the value 0 (zero) terminates the array. The option values INCLUDE_TYPES , EXCLUDE_TYPES and EXCLUDE_INSTANCES are mutually exclusive.

EXCLUDE_TYPES

Instances of type specified in the <exclude_or_include> argument will not be copied. When the SUBTYPES options is set, additionally instances that are subtypes of the specified types in <exclude_or_include> argument will not be copied. The content of the <exclude_or_include> argument must be an array of GENERIC, each defining an instance type. A GENERIC with the value 0 (zero) terminates the array. The option values INCLUDE_TYPES , EXCLUDE_TYPES and EXCLUDE_INSTANCES are mutually exclusive.

SUBTYPES

This option has only effect when used together with INCLUDE_TYPES or EXCLUDE_TYPES options.

EXCLUDE_INSTANCES

The instances specified in the <exclude_or_include> argument will not be copied. The content of the <exclude_or_include> argument must be an array of GENERIC. A GENERIC with the value 0 (zero) terminates the array. The option values INCLUDE_TYPES , EXCLUDE_TYPES and EXCLUDE_INSTANCES are mutually exclusive.

COPY_SHALLOW

Only the source instance will be copied, i.e., no instance graph will be copied. The operation will be a shallow copy operation. When the source model and the target model is the same, the instance references in the source instance will be copied to the target instance.

EXCLUDE_ALL_INSTANCES

Only the source instance will be copied. The operation will be a shallow copy operation. No instance references will be copied, only attributes of primitive data types, including aggregates of primitive data types, will be copied.

 

Example


<Missing Example>

 

See also

Filter by label

There are no items with the selected labels at this time.

Â