MBSE Integration Services for Integrating Modeling Tools
exportCollection()
DataManagementImpl::CollectionOutput exportCollection ( const std::string inputData )
Use Case 1 — Create a business object in Teamcenter representing the integrating tool authored model
This example shows how to create an Item object representing a GolfCart model. Also after creating the object in Teamcenter, it is checked out using userSpecificInputs as shown in the JSON example.
The following entry in the Integration Definition File is required for this to work:
<ObjectMapping type="Model" behaviorType="MIXED" tctype="Item">
<AttributeMappings>
<AttributeMapping name="Description" tcattr="object_desc"/>
<RevisionAttributeMapping>
<AttributeMapping name="Description" tcattr="object_desc"/>
</RevisionAttributeMapping>
</AttributeMappings>
</ObjectMapping>
Pass the following JSON string as an input to exportCollection(). The output returns the tcContainerIdentifier value in a similar output JSON, which is a Teamcenter-assigned unique identifier of the business object representing the model. The tcContainerIdentifier can subsequently be used to import or update the model in Teamcenter.
{
"AllContainers": {
"toolIdentifier": "SAMPLE",
"Containers": [
{
"containerIdentifier": "GolfCart_Identifier",
"containerName": "GolfCart",
"containerType": "Model",
"tcContainerName": "GolfCart",
"isTopContainer": true,
"action": "add",
"attributes": [
{ "attrName": "Description", "tcAttrName": "", "value": [ "This is a GolfCart." ] }
],
"revAttributes": [
{ "attrName": "Description", "tcAttrName": "object_desc", "value": [ "This is a cart GolfCart, revision A." ] }
],
"Components": [],
"userSpecificInputs": [
{ "inputKey": "CHECKOUT", "values": [ "true" ] }
]
}
]
}
}
Use Case 2 — Create a business object in Teamcenter to store a tool-authored model file
The following entry in the integration definition file is required for this to work. Note that RevisionAttributeMapping is not required for a non-Item Teamcenter object.
<ObjectMapping type="Design" behaviorType="MIXED" tctype="Zip">
<AttributeMappings>
<AttributeMapping name="Description" tcattr="object_desc"/>
</AttributeMappings>
</ObjectMapping>
Pass the following JSON string as an input to exportCollection(). The output returns the tcContainerIdentifier value of the dataset under which the file is to be uploaded. The output JSON also returns a writeTicket that can be used to upload files to Teamcenter using FMS SOAs.
{
"AllContainers": {
"toolIdentifier": "SAMPLE",
"Containers": [
{
"containerIdentifier": "GolfCart_Dataset_identifier",
"containerName": "GolfCart_Dataset",
"containerType": "DesignData",
"tcContainerIdentifier": "",
"tcContainerType": "Zip",
"tcContainerName": "GolfCart_Dataset",
"isTopContainer": false,
"action": "add",
"datasetFileInfos": [
{
"fileName": "GolfCartModelFile",
"fileExtension": "zip",
"filePath": "D:\\GolfCart",
"namedReferenceName": "ZIPFILE",
"allowReplace": true,
"isText": false
}
]
}
]
}
}
Use Case 3 — Associate two business objects in Teamcenter through a GRM relation
Use case 1 shows how to create a business object representing a GolfCart Model. Use Case 2 shows how to create a business object that stores a GolfCart Model File. This use case shows how to associate these two objects. The type of association — BVR, GRM, GBVR or REF (in this case GRM) — is decided by the integration definition file. The GRM relation type to be created between these two objects is also decided by reltype in BHMElement in the integration definition file.
The following entry in the integration definition file is required for this to work. Attribute mapping is omitted to keep it concise.
<ObjectMapping type="Model" behaviorType="MIXED" tctype="Item">
<BHMElement type="Design" tctype="Zip" behaviorType="GRM" reltype="IMAN_specification" isPrimary="false" isPrimaryAnchor="false" isSecondaryAnchor="false"> </BHMElement>
</ObjectMapping>
Pass the following JSON string as an input to exportCollection(). The output JSON contains the tcComponentIdentifier value of the newly created GRM relation along with the tcContainerIdentifier values of the container objects. Note that the value of tcContainerIdentifier of an already created GolfCart_Dataset is populated in the Components section. Container information of an already created object is not required in the input JSON.
{
"AllContainers": {
"toolIdentifier": "SAMPLE",
"Containers": [
{
"containerIdentifier": "GolfCart_Identifier",
"containerName": "GolfCart",
"containerType": "Model",
"tcContainerName": "GolfCart",
"isTopContainer": true,
"action": "add",
"attributes": [],
"revAttributes": [],
"Components": [
{
"componentName": "",
"componentIdentifier": "GolfcartDesignData",
"componentType": "Design",
"tcComponentName": "",
"tcComponentIdentifier": "",
"tcComponentType": "",
"tcComponentCopyStableID": "",
"containerIdentifier": "GolfCart_Dataset_identifier",
"tcContainerIdentifier": "xHAHH_KPNqBkC",
"action": "add",
"attributes": []
}
]
}
]
}
}
Use Case 4 — Associate two business objects in Teamcenter through a BVR relation
Use case 1 shows how to create a business object representing a GolfCart Model. Similarly, an object representing a Battery model is created. This use case shows how to associate these two objects through a parent-child relation. The type of association — BVR, GRM, GBVR or REF (in this case BVR) — is decided by the behaviorType in BHMElement in the integration definition file.
The following entry in the integration definition file is required:
<ObjectMapping type="Model" behaviorType="MIXED" tctype="Item">
<BHMElement type="Model" tctype="Item" behaviorType="BVR">
<AttributeMappings>
<AttributeMapping name=" occurrence_name" tcattr="bl_occurrence_name"/>
<AttributeMapping name="cifComponentIdentifier" tcattr="Cif0ToolSpecificIntInfo::cif0ToolProperties"/>
<RevisionAttributeMapping/>
</AttributeMappings>
</BHMElement>
</ObjectMapping>
Pass the following JSON string as an input to exportCollection(). The output JSON contains the tcComponentIdentifier value of the newly created occurrence along with the tcContainerIdentifier values of the objects.
{
"AllContainers": {
"toolIdentifier": "SAMPLE",
"Containers": [
{
"containerIdentifier": "GolfCart_Identifier",
"containerName": "GolfCart",
"containerType": "Model",
"tcContainerName": "GolfCart",
"isTopContainer": true,
"action": "add",
"attributes": [],
"revAttributes": [],
"Components": [
{
"componentName": "",
"componentIdentifier": "Battery",
"componentType": "Model",
"tcComponentName": "",
"tcComponentIdentifier": "",
"tcComponentType": "",
"tcComponentCopyStableID": "",
"containerIdentifier": "Battery_Identifier",
"tcContainerIdentifier": "",
"action": "add",
"attributes": [
{ "attrName": "occurrence_name", "tcAttrName": "bl_occurrence_name", "value": [ "Battery" ] }
]
}
]
},
{
"containerIdentifier": "Battery_Identifier",
"containerName": "Battery",
"containerType": "Model",
"tcContainerName": "Battery",
"isTopContainer": false,
"action": "add",
"attributes": [],
"revAttributes": [],
"Components": []
}
]
}
}
Use Case 5 — Associate two port objects in Teamcenter through a connection
This is a special case in which a port object is associated with the parent container object through a GBVR association. The PowerSupply connection object is associated with its parent GolfCart object with a BVR association.
The following entry in the integration definition file is required. Attribute mapping is omitted to keep it concise.
<ObjectMapping type="Model" behaviorType="MIXED" tctype="Item">
<BHMElement type="Model" tctype="Item" behaviorType="BVR"></BHMElement>
<BHMElement type="Port" tctype="GeneralDesignElement" behaviorType="GBVR"></BHMElement>
</ObjectMapping>
<ObjectMapping type="Connection" behaviorType="MIXED" tctype="Connection">
</ObjectMapping>
<ObjectMapping type="Port" behaviorType="MIXED" tctype="GeneralDesignElement">
</ObjectMapping>
Pass the following JSON string as an input to exportCollection():
{
"AllContainers": {
"toolIdentifier": "SAMPLE",
"Containers": [
{
"containerIdentifier": "GolfCart_Identifier",
"containerName": "GolfCart",
"containerType": "Model",
"tcContainerName": "GolfCart",
"isTopContainer": true,
"action": "add",
"attributes": [
{ "attrName": "Item_Description", "tcAttrName": "", "value": [ "This is a cart GolfCart." ] }
],
"revAttributes": [
{ "attrName": "Revision_Description", "tcAttrName": "object_desc", "value": [ "This is a cart GolfCart, revision A." ] }
],
"Components": [
{
"componentName": "",
"componentIdentifier": "Battery",
"componentType": "Model",
"tcComponentName": "",
"tcComponentIdentifier": "",
"tcComponentType": "",
"tcComponentCopyStableID": "",
"containerIdentifier": "Battery_Identifier",
"tcContainerIdentifier": "",
"action": "add",
"attributes": [
{ "attrName": "occurrence_name", "tcAttrName": "bl_occurrence_name", "value": [ "Battery" ] }
]
},
{
"componentName": "",
"componentIdentifier": "MotorDrive",
"componentType": "Model",
"tcComponentName": "",
"tcComponentIdentifier": "",
"tcComponentType": "",
"tcComponentCopyStableID": "",
"containerIdentifier": "MotorDrive_Identifier",
"tcContainerIdentifier": "",
"action": "add",
"attributes": [
{ "attrName": "occurrence_name", "tcAttrName": "bl_occurrence_name", "value": [ "MotorDrive" ] }
]
},
{
"componentName": "",
"componentIdentifier": "Connection1",
"componentType": "Connection",
"tcComponentName": "",
"tcComponentIdentifier": "",
"tcComponentType": "",
"tcComponentCopyStableID": "",
"containerIdentifier": "PowerSupply",
"tcContainerIdentifier": "",
"owningContainerIdentifier": "",
"tcOwningContainerIdentifier": "",
"action": "add",
"attributes": [
{ "attrName": "occurrence_name", "tcAttrName": "bl_occurrence_name", "value": [ "Connection1" ] }
],
"ComponentLinks": [
{
"componentIdentifier": "OutPort",
"tcComponentIdentifier": "",
"owningComponentIdentifier": "Battery",
"tcOwningComponentIdentifier": "",
"action": "add"
},
{
"componentIdentifier": "InPort",
"tcComponentIdentifier": "",
"owningComponentIdentifier": "MotorDrive",
"tcOwningComponentIdentifier": "",
"action": "add"
}
]
}
],
"userSpecificInputs": [
{ "inputKey": "CHECKOUT", "values": [ "true" ] }
]
},
{
"containerIdentifier": "Battery_Identifier",
"containerName": "Battery",
"containerType": "Model",
"tcContainerName": "Battery",
"isTopContainer": false,
"action": "add",
"attributes": [
{ "attrName": "Item_Description", "tcAttrName": "", "value": [ "This is a cart battery." ] }
],
"revAttributes": [
{ "attrName": "Revision_Description", "tcAttrName": "object_desc", "value": [ "This is a cart battery, revision A." ] }
],
"Components": [
{
"componentName": "",
"componentIdentifier": "OutPort",
"componentType": "Port",
"tcComponentName": "",
"tcComponentIdentifier": "",
"tcComponentType": "",
"tcComponentCopyStableID": "",
"containerIdentifier": "TestPort",
"tcContainerIdentifier": "",
"owningContainerIdentifier": "",
"tcOwningContainerIdentifier": "",
"action": "add",
"attributes": [
{ "attrName": "occurrence_name", "tcAttrName": "bl_occurrence_name", "value": [ "OutPort" ] }
]
}
]
},
{
"containerIdentifier": "MotorDrive_Identifier",
"containerName": "MotorDrive",
"containerType": "Model",
"tcContainerName": "MotorDrive",
"isTopContainer": false,
"action": "add",
"attributes": [
{ "attrName": "Item_Description", "tcAttrName": "", "value": [ "This is a cart MotorDrive." ] }
],
"revAttributes": [
{ "attrName": "Revision_Description", "tcAttrName": "object_desc", "value": [ "This is a cart MotorDrive, revision A." ] }
],
"Components": [
{
"componentName": "",
"componentIdentifier": "InPort",
"componentType": "Port",
"tcComponentName": "",
"tcComponentIdentifier": "",
"tcComponentType": "",
"tcComponentCopyStableID": "",
"containerIdentifier": "TestPort",
"tcContainerIdentifier": "",
"owningContainerIdentifier": "",
"tcOwningContainerIdentifier": "",
"action": "add",
"attributes": [
{ "attrName": "occurrence_name", "tcAttrName": "bl_occurrence_name", "value": [ "InPort" ] }
]
}
]
},
{
"containerIdentifier": "PowerSupply",
"containerName": "PowerSupply",
"containerType": "Connection",
"tcContainerIdentifier": "",
"tcContainerType": "",
"tcContainerName": "",
"isTopContainer": false,
"action": "add",
"tcFolderUid": "",
"tcLastModifiedDate": "",
"attributes": [
{ "attrName": "name", "tcAttrName": "object_name", "value": [ "PowerSupply" ] }
],
"revAttributes": [],
"datasetFileInfos": [],
"Components": []
},
{
"containerIdentifier": "TestPort",
"containerName": "Test Port",
"containerType": "Port",
"tcContainerIdentifier": "",
"tcContainerType": "",
"tcContainerName": "",
"isTopContainer": false,
"action": "add",
"tcFolderUid": "",
"tcLastModifiedDate": "",
"attributes": [
{ "attrName": "name", "tcAttrName": "object_name", "value": [ "TestPort" ] }
]
}
]
}
}
Source: https://docs.sw.siemens.com/en-US/doc/282219420/PL20251212545240207.xid1913857/xid1914677 · retrieved Fri Jul 10 2026 00:00:00 GMT+0000 (Coordinated Universal Time)