Introduce a Simple demo from 3DEPERIENCE CATIA Design and generated STEP derived output and use EIF to download STEP, using Postman to invoke web services. So from event monitoring we can listening Engineering Item information, and from this , we can get geometry of the design, so will cover more cases on integration with OnCloud environment.
Prerequisite:
A normal user with PCS , STS (generate STEP), PAU(genete derived ouput), XXH (manage export job)
An Administrator user with PCS , PFI (create connect agent), and the platform need XXC token(transfer to step and export will consume).
First , administrator user check “Platform Management” -> “Content” -> “Configuration Center” -> “Derived Format Management”,
Ensure there is a rule from 3DEXPERIENCE CATIA to STEP 242 “on demand”.
Second, normal user search 3DEXPERIENCE CATIA data which needed to be downloaded, open it at “Product Structure Editor”, click “information” -> “derived output” -> “generated derived output” , select STEP, and click “generate”, please be noticed that this will consume Enterprise Integration IP Credit (XXC) token.
And wait it finished.
get physical id of the 3D Part by dragging the physical product to notepad++.get id after “objectId”:, the value is “64F5342B0000283466435C080001117C” at this example.
Administrator user open Enterprise Integration Architect (PFI)’s agent management. Click create agent, remember agent password because this only show one time. Allowed Password User can only be an normal user, not administrator.
From “Availble Services” tab right after agent manager get 3DSpace url and exchange url
Download and register Postman.
Open postman create collection for example “EIFInvoke”
Set Collection Authorization as Basic Auth, and input Username as agent name , input Password as agent password.
And create environment “BJCloud” as variable holder.
Create variable 3dspaceurl, exchangeurl, ENGITEMPID, exportid,
Input 3dspaceurl and exchangeurl value from “agent manager”‘s Availble Services, input ENGITEMPID as 64F5342B0000283466435C080001117C , which is got when dragging Physical Product to notepad++
Create request under EIFInvoke collection, as get “{{exchangeurl}}/resources/v1/modeler/logincheck”, default auth type should be “inherit auth from parent”. Click send , if status is 200 , this means it works fine for the agent username and password.
Then we will invoke web service public API from
Create request post “{{exchangeurl}}/resources/v1/modeler/exchangejobs/exports”
Set 3 headers as below picture
Accept application/json
Content-Type application/json
X-Requested-With batch
Set body and scripts as
{
“version”: “2.1”,
“title”: “MyFirstExport”,
“format”: “STEPAP242XML”,
“objects”: [
{
“source”: “{{3dspaceurl}}”,
“type”: “VPMReference”,
“identifier”: “{{ENGITEMPID}}”,
“relativePath”: “/resource/v1/dseng/VPMReference/{{ENGITEMPID}}”
}
],
“parameters”: [
{
“domain”: “Engineering”,
“expandDepth”: “-1”,
“geometricalFormats”: [
{
“type”: “Part”,
“ignoreIfNotFound”: true,
“nativeCADPreferences”: [
“CREO”,
“CATIAV5”
],
“derivedOutput”: [
{
“format”: “STEP”,
“geometricalParameters”: [
{
“name”: “ApplicationProtocol”,
“values”: [
“AP242E1”
]
},
{
“name”: “3DAnnotations”,
“values”: [
“graphic”,
“none”
]
}
]
}
]
}
],
“applicativeCompletionOptions”: {
“with3DShapes”: true,
“withDrawings”: true,
“withDocuments”: true
}
},
{
“domain”: “Manufacturing”,
“expandDepth”: “1”
},
{
“domain”: “AdvancedFilter”,
“filterAsSelector”: true
}
]
}
input scripts as
var jsonData = JSON.parse(responseBody);
var exportid = jsonData.identifier;
console.log(exportid);
// pass login ticket to next service calls via env variable
postman.setEnvironmentVariable(“exportid”, exportid)
click send , then we generated export task.
From normal user, select Enterprise IP Integration Managerment , we can saw the job just created.
Create request post “{{exchangeurl}}/resources/v1/modeler/exchangejobs/exports/{{exportid}}/submit” as below.
Set headers as previous request.
Click send, then will submit the job. Status 200 means successfully submitted.
Create request get “{{exchangeurl}}/resources/v1/modeler/exchangejobs/exports/{{exportid}}”,
Set headers as before. Click send , we will get the job status , if finished, we have the link to download the derived output.
The URL at response can be used directly to download the step.
So enjoy the step file which can be downloaded by codes behavior as Postman’s activity.