Creating Engineering Materials
You can create an engineering material object by specifying the required attributes and an optional soft attribute in the request body.
Example: Creating an Engineering Material Object
The following example shows you how to create an engineering material object by specifying the required attributes and a soft attribute in the request body.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/EngineeringMaterials
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "test 1",
"TestSoftAttribute": "test soft attribute1",
"Density": {
"Value": 1.44,
"Unit": "kg/m**3",
"Precision": 3
},
"[email protected]": "Folders('OR:wt.folder.SubFolder:494974')",
"[email protected]": "Containers('OR:wt.pdmlink.PDMLinkProduct:132938')"
}
You can create one or more engineering materials in a single call by specifying the required attributes in the request body. Optionally, you can also create one or more engineering materials with soft attributes.
Example: Creating Multiple Engineering Material Objects
The following example shows you how to create two engineering material objects by specifying the soft attributes along with the required attributes in the request body.
Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/Sustainability/CreateEngineeringMaterials
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"EngineeringMaterials": [
{
"Name": "test 1",
"TestSoftAttribute": "test soft attribute1",
"Density": {
"Value": 1.44,
"Unit": "kg/m**3",
"Precision": 3
},
"[email protected]": "Folders('OR:wt.folder.SubFolder:494974')",
"[email protected]": "Containers('OR:wt.pdmlink.PDMLinkProduct:132938')"
},
{
"Name": "test 2",
"TestSoftAttribute": "test soft attribute2",
"Density": {
"Value": 1.45,
"Unit": "kg/m**3",
"Precision": 3
},
"[email protected]": "Folders('OR:wt.folder.SubFolder:494974')",
"[email protected]": "Containers('OR:wt.pdmlink.PDMLinkProduct:132938')"
}
]
}
The request creates two engineering material objects with the corresponding soft attributes and other attributes specified for each.
Was this helpful?