Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
You can refer below artical to create softtype of wtpart using API's
https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS83161&posno=7&q=LWCNormalizedObject%20wtpart&nav=ptcdoctype||SFSolution||Document%20Type||Article&source=Searchhttps://support.ptc.com/appserver/cs/view/solution.jsp?n=CS83161&posno=7&q=LWCNormalizedObject%20wtpart&nav=ptcdoctype||SFSolution||Document%20Type||Article&source=Search
https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS138252&posno=4&q=LWCNormalizedObject%20&nav=ptcdoctype||SFSolution||Document%20Type||Article&source=Search
Thanks,
Shreyas
Hi Randy,
You can do this by:
private WTPart createSoftType(String number, String name, Folder folder) {
WTPart newSoftPart = WTPart.newWTPart(number, name);
FolderHelper.assignLocation(newSoftPart, folder);
TypeIdentifier typeidentifier = TypeHelper.getTypeIdentifier("WCTYPE|wt.part.WTPart|com.mydomain.MyPart");
WCTypeIdentifier wctypeidentifier = (WCTypeIdentifier) typeidentifier;
TypeDefinitionReference typeDefinitionReference = TypedUtilityServiceHelper.service.getTypeDefinitionReference(wctypeidentifier.getTypename());
newSoftPart.setTypeDefinitionReference(typeDefinitionReference);
ViewHelper.assignToView(newSoftPart, ViewHelper.service.getView("Design"));
return (WTPart) PersistenceHelper.manager.save(newSoftPart);
}
Regards