Skills
TC Datasets Files
Skill
tc-datasets-files. Attach real file content to Teamcenter objects over SOA. The three-step dataset recipe (createDatasets, getDatasetWriteTickets, FMS multipart upload, commitDatasetFiles), the two settings that silently return nothing if wrong, verified named references including NX UGMASTER, and why "FMS is blocked" is usually a missing session cookie. Use when checking a file into TC.
A deliverable that exists only in your response is not checked in. This is how a file becomes a managed Teamcenter dataset with retrievable content.
"FMS is blocked" is usually false
The Active Workspace gateway proxies FMS in both directions on the same port that
serves /tc. What masquerades as a blocked FMS is a multipart upload sent
without the live TC session cookies, which returns an empty 403.
The recipe
1. Create the dataset
Core-2006-03-DataManagement/createDatasets (the 2006-03 struct only; the
2010-04 variant faults on at least one instance).
Two settings silently break it:
toolUsedMUST be"". Any other value returns success with NO dataset.- Set
containerto the target ItemRevision uid andrelationTypeto attach in the same call, rather than creating freestanding and relating afterwards.
2. Get a write ticket
Core-2006-03-FileManagement/getDatasetWriteTickets
3. Upload through FMS
Multipart POST to <host>/fms/fmsupload/ with form fields fmsTicket and
fmsFile, plus the live TC session cookies and the X-XSRF-TOKEN header.
Without the session it 403s empty.
4. Commit
Core-2006-03-FileManagement/commitDatasetFiles
5. Verify before claiming success
Re-read the dataset and confirm its ref_list contains your fileName.
Download-verify with GET <host>/fms/fmsdownload/?ticket=<ticket>.
Verified named references
| Dataset type | Named reference | Notes |
|---|---|---|
Text |
Text |
|
Image |
Image |
|
Zip |
ZIPFILE |
|
UGMASTER |
UGPART |
An NX .prt becomes a real managed part dataset; TC auto-binds UGPART-ATTR |
JPEG |
broken (error 9037) | Use Image instead |
The UGMASTER/UGPART pair is the one that matters for CAD: it is the difference
between "a file is attached" and "NX can open this from Teamcenter."
Newer operations exist
Core-2017-05-FileManagement/commitDatasetFilesInBulk and
Core-2021-06-DataManagement/addNamedReferenceToDatasets are in the WSDL kit but
are not part of the proven recipe above. Look them up before assuming the 2006-03
path is the only one:
python scripts/soa_lookup.py --grep dataset
Note that Core-2006-03-DataManagement/createDatasets is flagged deprecated in
favour of createDatasets2, yet the 2006-03 struct is the one proven to work on
these instances while 2010-04 faults. Deprecation is a lead, not a verdict: see
tc-soa-payload-shapes.
Related skills
tc-object-authoring (create the ItemRevision to attach to),
tc-verify-and-cleanup (finding freestanding datasets by name later),
tc-soa-session.
Generated from skills/tc-datasets-files/SKILL.md in the tc-automation-skills library, which is the canonical copy and also serves as the agent skill set for Teamcenter work.