Unable to create a new NmOid for new EPMDocument
I am using Windchill PDMLink Release 11.0 and Datecode with CPS F000
Creating a new NmOid for a new EPMDocument throws Exception: Cant' initialize an ObjectReference to Null.
Below is our code:
//Creating a new EPMDocument
EPMContextHelper.setApplication(EPMApplicationType.toEPMApplicationType("EPM"));
EPMAuthoringAppType at = EPMAuthoringAppType.toEPMAuthoringAppType("COCRDRAFT");
EPMDocumentType dt = EPMDocumentType.toEPMDocumentType("CADCOMPONENT");
EPMDocument cadDoc = EPMDocument.newEPMDocument("docnumber", "docName", at, dt, "CAD_DOC");
//Now create a new NmOid
NmOid cadNewNmOid = NmOid.newNmOid(cadDoc.getPersistInfo().getObjectIdentifier());
Could you let me know what is the problem here?
Here are the errors that I faced
wt.util.WTRuntimeException: ERROR: Can't initialize an ObjectReference to null

