cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Create EPMDocument using WC API

aemaeth.2501
1-Visitor

Create EPMDocument using WC API

Hi,

We currently are trying to create a new EPMDocument (without content) into
our PDMLink. Bu using : EPMDocument newDoc =
EPMDocument.newEPMDocument(number, name, appType, docType, name), this
seems to work but we lacks a lot of attribute to set (Authoring app for
instance) and the persist operation fails.

Has anyone already tried this ?

Sicnerely,

Thibault Magné
7 REPLIES 7


If you use the new method, it does not handle assigning a lifecycle, folder, version series, and master based attributes for CAD file type. If the database allows for the object db column to be null, you can set the value to null. I find it easier to copy an existing EPMDocument object with copy methods in wt.enterprise.EnterpriseHelper and then change the values I want to change.






Sent from my Verizon Wireless BlackBerry

If you copy, don't you run into the possibility of accidentally not changing a value that gets carried over to the new doc?

I wrote a note loader, which is an EPMDoc, and it's pretty simple. I used the same new you had, then just set the TypeDefinitionReference, Series, CageCode/Org, Version, Iteration, Container, Description, Folder, LifeCycle, TeamTemplate, and State - along with any required IBA's. For quite a few of our loaders, we use VersionControlHelper.service.insertNode to persist because we want the default insert behavior on any new version.

I can't remember which sets were required by the system, and which were required by us, but it gives you an idea of what is needed.

Thanks
Chris

Can you do this in infoengine instead? I know you can easily create WTDocuments in a flash and can build the task using the Task Editor. Not sure for EPMDocuments but I assume so.

[cid:image001.gif@01CD0D95.1D48C950]

Steve Vinyard
Application Engineer

You can do anything really in InfoEngine if that is your poison of choice.

Either way it eventually resorts to using the JAVA API, so sometimes it is just easier to bypass an extra layer of risk.

I find Info*Engine better for querying and extracting vs. Creating new data. All perspective. I find folks can get Info*Engine to work for this sort of thing but only after many many extra hours of work. It tends to lead to spaghetti code also.








Sent from my Verizon Wireless BlackBerry

Its fast as all get out for creating data with no content though.



[cid:image001.gif@01CD0DA5.578C4D70]

Steve Vinyard
Application Engineer

Hello


the sub type you're trying to set is not the "Windchill business object" subtype that you see in the type manager


But the SubType attribute of the EPMDoc, managed by the resource bundle wt.epm.EPMDocSubTypeRB.


where you can specifiy the sub type of the CAD file stored in your EPMDoc. Notably for ProE. Example. Type= Part SubType = Solid



regards


Gregory

Announcements


Top Tags