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

Representations only accessible for WTDocs and CADDRAWINGS

avillanueva
22-Sapphire II

Representations only accessible for WTDocs and CADDRAWINGS

I have a bit of code that gets the representations of WTDocs and EPMDocuments. All was working well in Dev but in Test, I am seeing an odd behavior.  Thank you @Marco_Tosin for linking that article to the qml report on CAD Doc to Representations. I am using a call like this:

 

//Try to find and look in the default representation (most likely place)
Representation rep = RepresentationHelper.service.getDefaultRepresentation(doc);
if(rep != null) {
   returned = processRep(fileExt, rep, ch);
}

 

When I ran that report on my test server, only EPMDocuments that are CAD Drawings are showing up with representations when I know that all other EPMDocuments have representations as well. Stumped here.

avillanueva_0-1702482374760.png

PS: Yes, representations for all items are functioning properly via UI and I can access them and see them in the interface. They do exist.

1 ACCEPTED SOLUTION

Accepted Solutions
avillanueva
22-Sapphire II
(To:avillanueva)

I figured out my issue. The Dev server had EPMDocument with no WTPart associated. All the objects in my Prod/Test have WTParts associated. In the Derived Image table, the WTPart is the "Representable" and the EPMDocument its associated to is noted as "derived from". So I need to find another method or pass in the associated WTPart to the method above. Ugh. I verified that if you go to the Representations section of the UI for the CAD Doc and the WTPart, you are seeing the same Representations. 

View solution in original post

2 REPLIES 2
avillanueva
22-Sapphire II
(To:avillanueva)

I figured out my issue. The Dev server had EPMDocument with no WTPart associated. All the objects in my Prod/Test have WTParts associated. In the Derived Image table, the WTPart is the "Representable" and the EPMDocument its associated to is noted as "derived from". So I need to find another method or pass in the associated WTPart to the method above. Ugh. I verified that if you go to the Representations section of the UI for the CAD Doc and the WTPart, you are seeing the same Representations. 

Hi @avillanueva 

 

Yes, you find interesting behavior that I had not known for long time 😄 

If the CAD Document is linked "correctly" with a WTPart then the representation is really stored on WTPart. 

The "correctly" means if the build process has been done. (in DB there is column where that information is stored, if it is on EPM or WTP type)

Sometimes I could find a representation that should be stored on WTPart even though the owner link existed , because user just link the EPM with WTP by check-out/in function without build the WTPart attributes, BOM and so on.

 

PetrH 

Top Tags