Copy an object with SaveAs

This example pipeline demonstrates how to create an object and then copy it with Save As.


Pipeline consisting of JSON Generator Snap, Tc Create Snap and Tc SaveAs Snap.

Steps

1: Input for the creation is stored in JSON Generator. The stored JSON document contains data necessary for creating a Part.

Snap configuration

Snap output


Settings tab of JSON Generator Snap.

[
  {
    "object_type": "Part",
    "attributes": {
		"object_desc": "Test SaveAs with Snap",
		"object_name": "Test 010426 Save"
	},
	"expand": [
		"object_type",
		"object_string",
		"object_name",
		"object_desc",
		"item_id",
		"item_revision_id",
		"creation_date"
	]
  }
]

2: In the snap configuration following values has to fed into fields of the Tc Create Snap:

  • $object_type to field Object Type
  • $attributes to field Object Attributes Path
  • $expand to field Expand Attributes Path

Snap configuration

Snap output


Settings tab of Tc Create Snap.

[
  {
    "_id": "TC*Part Revision*null***AiDAANrP7hAnmD",
    "creation_date": "2026-04-01T13:06:25Z",
    "item_id": "052854",
    "item_revision_id": "A",
    "object_desc": "Test SaveAs with Snap",
    "object_name": "Test 010426 Save",
    "object_string": "052854/A;1-Test 010426 Save",
    "object_type": "Part Revision",
    "object_type_DISPLAY": "Part Revision",
    "UID": "AiDAANrP7hAnmD",
    "original": {
      "object_type": "Part",
      "attributes": {
        "object_desc": "Test SaveAs with Snap",
        "object_name": "Test 010426 Save"
      },
      "expand": [
        "object_type",
        "object_string",
        "object_name",
        "object_desc",
        "item_id",
        "item_revision_id",
        "creation_date"
      ]
    }
  }
]

Output document contains data of newly created object. The resulting object includes ID information which can be used as Object ID in Tc SaveAs Snap next.

Note:

UIDs in Teamcenter are as the name says UNIQUE. The UIDs in the example only exist in our Teamcenter system as expected for our example. Same is valid for Adapter ID "_id" since its base is the UID.

Snap configuration

Snap output


Settings tab of Tc SaveAs Snap. Only fields for 'Object ID' and 'Expand Attributes Path' are filled. 'Dataset Operation' is set to Default.

[
  {
    "_id": "TC*Part Revision*null***wiAAANrP7hAnmD",
    "creation_date": "2026-04-01T13:06:28Z",
    "item_id": "052855",
    "item_revision_id": "A",
    "object_desc": "Test SaveAs with Snap",
    "object_name": "Test 010426 Save",
    "object_string": "052855/A;1-Test 010426 Save",
    "object_type": "Part Revision",
    "object_type_DISPLAY": "Part Revision",
    "UID": "wiAAANrP7hAnmD",
    "original": {
      "_id": "TC*Part Revision*null***AiDAANrP7hAnmD",
      "creation_date": "2026-04-01T13:06:25Z",
      "item_id": "052854",
      "item_revision_id": "A",
      "object_desc": "Test SaveAs with Snap",
      "object_name": "Test 010426 Save",
      "object_string": "052854/A;1-Test 010426 Save",
      "object_type": "Part Revision",
      "object_type_DISPLAY": "Part Revision",
      "UID": "AiDAANrP7hAnmD",
      "original": {
        "object_type": "Part",
        "attributes": {
          "object_desc": "Test SaveAs with Snap",
          "object_name": "Test 010426 Save"
        },
        "expand": [
          "object_type",
          "object_string",
          "object_name",
          "object_desc",
          "item_id",
          "item_revision_id",
          "creation_date"
        ]
      }
    }
  }
]

The output JSON document provides an example output from SaveAs execution for a Part in Teamcenter OOTB data model. The created object is a copy of the original one. This is recognizable by checking the object_desc attribute e.g.