Skip to main content
11-Garnet
September 4, 2024
Question

2D and 3D drawings without a publications

  • September 4, 2024
  • 4 replies
  • 1816 views

I need to find on windchill all those cad documents that do not have a publication

is it possible to generate a report that identifies, starting from a code, all those 3D and 2D documents that do not have a publication in (.pdf, .dxf, .step)?

 

Translated by the moderation using Google Translate
-----------------------------------------------------------------------------------------------

Devo trovare su windchill tutti quei documenti cad che non hanno una pubblicazione

è possibile generare un report che mi individua partendo da un codice tutte quei documenti 3d e 2D che non hanno una pubblicazione in (.pdf , .dxf , .step) ?

4 replies

Marco Tosin
21-Topaz I
21-Topaz I
September 4, 2024

Se scrivi in italiano difficilmente troverai qualcuno che ti risponde.

Dovresti anche specificare meglio il motivo della richiesta, per avere una risposta pertinente, altrimenti diventa difficile.

Grazie

 

If you write in Italian you are unlikely to find someone to answer you.

You should also better specify the reason for the request to get a relevant answer, otherwise it becomes difficult.

Thank you

Marco
16-Pearl
September 5, 2024

It might be possible to do it with the Query Builder but I ended up writing an sql query

 

 

USE windchill_inst;

SELECT 
 A0.idA2A2,
 A0B.documentNumber,
 A0B.authoringApplication,
 A0B.docType,
 CONVERT(varchar, A0.modifyStampA2, 120) AS modifyStamp,
 A0.statestate,
 A1.classnameA2A2,
 A1.idA2A2,
 A2.namecontainerInfo
FROM 
 [windchill_inst].DerivedImage A3
 RIGHT OUTER JOIN [windchill_inst].EPMDocument A0 
 ON A3.idA3A6 = A0.idA2A2
 RIGHT OUTER JOIN [windchill_inst].EPMDocumentMaster A0B 
 ON A0.idA3masterReference = A0B.idA2A2
 LEFT OUTER JOIN [windchill_inst].DerivedImage A1 
 ON A3.idA2A2 = A1.idA2A2,
 (SELECT 
 A2.idA2A2, 
 A2.namecontainerInfo 
 FROM 
 [windchill_inst].ExchangeContainer A2 
 UNION ALL 
 SELECT 
 A2.idA2A2, 
 A2.namecontainerInfo 
 FROM 
 [windchill_inst].OrgContainer A2 
 UNION ALL 
 SELECT 
 A2.idA2A2, 
 A2.namecontainerInfo 
 FROM 
 [windchill_inst].WTLibrary A2 
 UNION ALL 
 SELECT 
 A2.idA2A2, 
 A2.namecontainerInfo 
 FROM 
 [windchill_inst].PDMLinkProduct A2 
 UNION ALL 
 SELECT 
 A2.idA2A2, 
 A2.namecontainerInfo 
 FROM 
 [windchill_inst].Project2 A2
 ) A2
WHERE 
 A0.latestiterationInfo = 1
 AND A0.branchIditerationInfo = 
 (SELECT 
 MAX(AA0.branchIditerationInfo) 
 FROM 
 [windchill_inst].EPMDocument AA0 
 INNER JOIN [windchill_inst].EPMDocumentMaster AA0B 
 ON AA0.idA3masterReference = AA0B.idA2A2
 WHERE 
 AA0B.idA2A2 = A0B.idA2A2)
 AND UPPER(A1.name) IS NULL
 AND A0B.docType <> 'NOTE'
 AND A0.idA3containerReference = A2.idA2A2;

 

AR_0111-GarnetAuthor
11-Garnet
September 10, 2024

I saw the solution .. only I'm not familiar with SQL query and I wouldn't know how to create it and where to insert it ...

Marco Tosin
21-Topaz I
21-Topaz I
September 5, 2024
AR_0111-GarnetAuthor
11-Garnet
September 20, 2024

can you help me find all the tables and join for my search?

Marco Tosin
21-Topaz I
21-Topaz I
September 20, 2024

Have you taken a look at the article?

 

It is all written down and, at the end, there is even a ready-made example report.

 

Marco_Tosin_0-1726862434454.png

 

 

Marco
18-Opal
September 22, 2024

@AR_01 ,

 

I wrote an SQL query that finds CAD Docs that do not have pdf, dxf or step files created by publishing, however, it's difficult to say if this is really what you need.

 

Is the idea here to find CAD Docs that meet a criteria and then publish them? If yes, you really want a Java utility to find them and publish them rather than a Query Report or an SQL query.

 

Also, your title states "2D and 3D drawings without a publications" yet the body of your post states "all those cad documents".  Which is it? Drawings only or all cad docs?

 

Also, which iteration are you concerned about?

  • Are you looking at all iterations?
  • The latest iteration of each revision?
  • The latest iteration of the latest revision?

 

Also, you state in your post, ""it possible to generate a report that identifies, starting from a code,"

What does "starting from a code" mean?

What code are you referring to?

 

Finally, once you have your list of CAD objects, then what?  My guess is you want to publish them.  True?

 

David

AR_0111-GarnetAuthor
11-Garnet
September 23, 2024

but how do I get your query to be loaded by windchill?

18-Opal
September 23, 2024

By uploaded I guess you mean use the query in a Query Report. True?

To do this you'd have to create the same SQL query in the Query Builder.

I just went straight to SQL to make the query.  I did not use Query Builder, which is a UI for creating SQL queries.

 

Keep in mind to create a SQL query you need to have an understanding of the Windchill database, meaning how the tables and their columns are related.  Query Builder UI makes this somewhat easier than writing an SQL script but you still need to have some understanding of the database.