Skip to main content
19-Tanzanite
November 29, 2022
Solved

Find EPMDocument to wtPart associations that have never been built

  • November 29, 2022
  • 3 replies
  • 3899 views

I am using Windchill PDMLink Release 11.0 and Datecode with CPS M020-CPS08

I would like to find which wtPart to EPMDocuments are associated but never built. How do I find that either in a report or in the tables, Part and CAD documents that have never been built?

Best answer by HelesicPetr

Hi @BrianToussaint 

QML Report just for you 😄

I named the xml with WTParts but it shows EPMDocuments 😄 it doesn't matter

PetrH

 

Windchill 12.0.2.7

3 replies

22-Sapphire I
November 29, 2022

I noodled on this for a LONG time a while back.  Can't seem to find the report that I came up with.

Will try to dig up and post.

 

Note: One way that I found to figure these out on a test Windchill system with no other users or activity is this (using Oracle):

- In Oracle, update statistics (have to do this)

- In Oracle, query the number of rows in all tables and export to spreadsheet

- Make a single change in Windchill (e.g. Build a WTPart / EPMDocument with an existing but not yet built assocation)

- In Oracle, again update statistics

- In Oracle, again, query the number of rows in all tables and export to spreadsheet

- In a spreadsheet, find any tables which have new rows

- Focus on these table(s) for Reports.

 

exec dbms_stats.gather_schema_stats('<username>');

select table_name,num_rows from user_tables where num_rows > 0 order by table_name

19-Tanzanite
November 29, 2022

I will have try this, but I will have to find the commands for SQL Server.  Thanks for the direction @MikeLockwood 

MarcoTosin
21-Topaz I
November 29, 2022

Can this article help you?

 

https://www.ptc.com/en/support/article/CS332588

 

 

Marco
HelesicPetr
22-Sapphire II
November 30, 2022

Hi @BrianToussaint 

 

information is stored in a EPMBuildHistory

if the row does not exist the Build has never been done 

 

SQL could look like >

 

select EPMMaster.documentNumber,build.* from wcuser.EPMBuildRule build 
inner join wcuser.EPMDocument EMDocument on build.branchIdA3A5=EMDocument.branchIditerationInfo 
inner join wcuser.EPMDocumentMaster EPMMaster on EPMMaster.idA2A2=EMDocument.idA3masterReference
where EPMMaster.documentNumber not in (select EPMMaster2.documentNumber from wcuser.EPMBuildHistory buildH 
inner join wcuser.EPMDocument EMDocument2 on buildH.idA3A5=EMDocument2.idA2A2 
inner join wcuser.EPMDocumentMaster EPMMaster2 on EPMMaster2.idA2A2=EMDocument2.idA3masterReference)

 

PetrH

19-Tanzanite
November 30, 2022

Hi @HelesicPetr 

 

That makes sense, but what table do I compare that to?  I have objects that are linked together but have not been built and when doing a compare from the CAD structure to the wtPart structure show up in red with a warning triangle.  If I as admin select the objects and do a one level build everything will be okay.  We recently added WTParts to Windchill and we have some residual parts from the import that didn't get built during the process.  I'm trying to find these parts and clean them up.

 

Brian

HelesicPetr
22-Sapphire II
November 30, 2022

Hi @BrianToussaint 

I've edited my previous post with sql examle:D.

PetrH