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

Find EPMDocument to wtPart associations that have never been built

BrianToussaint
19-Tanzanite

Find EPMDocument to wtPart associations that have never been built

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

10 REPLIES 10

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

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

Can this article help you?

 

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

 

 

Marco

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

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

Hi @BrianToussaint 

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

PetrH 

See attached document which shows more detail and the start of a report.

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

Also very useful information about the BuldRule Type is in cs125790 and cs188209

PetrH

HelesicPetr_1-1669881353122.png

 

Announcements