Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello JM_10527524,
I'm Charles from PTC Technical Support in Europe, I will provide you assistance on this question.
Is it possible to share the full error message?
I remain at your disposal for any questions or concerns.
Kind Regards,
Charles Gautier.
Hi Charles!
The thing is, that we don't get an error message. The part and the document is getting linked, but the document gets iterated. However, I think that we found the solution recently.
If we use this code, everything seems to work fine:
TypeIdentifier typeIdentifier = TypeIdentifierHelper.getTypeIdentifier(ext.vce.SupplementaryLink);
ConfigurableDescribeLink link = new ConfigurableDescribeLink();
link.setRoleAObject(theDoc);
link.setRoleBObject(thePart);
link.setTypeDefinitionReference(TypedUtility.getTypeDefinitionReference(typeIdentifier.getTypename()));
Date date = new Date();
Timestamp timestamp2 = new Timestamp(date.getTime());
PersistentObjectManager.getPom().insert(link, timestamp2, timestamp2);
If you see that you might have a better solution, please provide that. Otherwise, we can close this case.
Best regards,
Johan Mattsson
Hello Johan,
Thanks for your feedback, and congrats to you for figuring out the resolution.
Note PersistentObjectManager is not marked as being a supported API.
This question will be closed today.
KR,
Charles.