Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello,
I’m developing a custom application in C# to integrate with Windchill. My goal is to:
List the projects shown under "Recent Projects"
When a project is selected, display the related objects such as WTParts, WTDocuments, EPMDocuments, etc.
I have already found and listed the Recent Projects via SQL (likely using the Project2 table and related filters), but I have not been able to identify how to retrieve the associated content (e.g. WTPart, WTDocument) linked to each project.
Could you please help me with:
How to get WTParts, WTDocuments, or other content linked to these Recent Projects?
Whether there is a specific table or join that I should be using in SQL?
Or alternatively, is there a REST API (WRS) endpoint that provides this data?
I would greatly appreciate any guidance or documentation on this.
Thank you in advance.
I am not expert in REST API (yet) but that would be my way to go. If you do not find a REST API that works for you, I recommend writing your own. Windchill is Java based so you can write your own services if you do not find what you are looking for. This can do the heavy lifting for your different steps like accessing recent projects based on a username. I would avoid directly accessing the back end database.
I’m also planning to develop this myself, but the main issue is that I couldn’t find the linking table between the projects I found in SQL and the related WTPart, WTDocument, etc.
If I can identify that linking table, it will make everything much easier for me.
Are you trying to display ALL the objects related to the Project? That could be quite a lot of objects...!
Projects are a bit unique in that there can be items stored in the Project (if they were created there), and also items shared to the project. I'm not sure what your use case is.
For items stored, it's a Context link
For items shared, it looks like this:
I was able to locate the project data using the idA2A2 value from the Project2 table via the Shared Container Map. However, I couldn’t find the corresponding IDs that would allow me to retrieve related WTPart, WTDocument, or EPMDocument entries through the same map.
In some cases, I can reach a related WTDocument by matching the project name with the WTDocumentMaster name, but relying on the name field is not a reliable or consistent approach.
I was hoping there might be a WRS API that lists the contents of a project and exposes these links more clearly, but as far as I can tell, no such API exists (or it's not documented).