I am currently trying to create an EPMDocument by using a robot. More specifically, I would like to use a robot to create a notebook, as it is called in Creo (or "layout", if you're using Pro Engineer Wildfire). Does anyone know how to do that? Unfortunately, I don't quite know how to use the classes EPMDocumentType, EPMAuthoringAppTyp and EPMDocSupType.
Can somebody please help me with that?
I'd appreciate it.
Thanks a lot.
I found this for creating an EPMDocument, but it didn't work.
EPMDocument doc = EPMDocument.newEPMDocument (<number>, <name>, <EPMAuthoringAppType authoring App>, <EPMDocumentType docType>, <CADName>);
so I tried this:
wt.epm.EPMAuthoringAppType at = wt.epm.EPMAuthoringAppType.toEPMAuthoringAppType("PROE");
wt.epm.EPMDocumentType dt = wt.epm.EPMDocumentType.toEPMDocumentType("LAYOUT");
wt.epm.EPMDocument layout=wt.epm.EPMDocument.newEPMDocument(vergabeNumberLayout, vergabeNameLayout, at, dt, vergabeCADNameLayout);
In the "Workflow Process Administration" I got the error: The value of "Owner Application" cannot be set to null, since it is a "required" attribute.
I really don't know how to fix this.
Can someone please help me?
Solved! Go to Solution.
I am now able to create a new EPMDocument. Thanks to your help. But now I would like to use a template, when creating a new EPMDocument, as a workaround for the following problem:
I can load a primary content, but I am not able to open this content in Creo. When I try to open my EPMDocument (Creo Assembly) in Creo, I somehow get the error that Creo cannot call the EPMDocument. Is it possible to use a template for a CAD Document in a code in my workflow to avoid this problem?
Something like "setTemplate for EPMDocument". Does something like this exist?
I would really appreciate your help.
Thanks a lot..