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

How to find ContentHolder from accelertor file?

SOLVED
Highlighted
Level 1

How to find ContentHolder from accelertor file?

Hello!

Since there is a issue with Creo2 and accelertor files we need to locate those in our Windchill 10.0 M030 system.

I know it is possible to get hold of accelerator files from EPMDocuments using below syntax:

EPMDocument doc

ContentHolder holder = getContentService().getContents(doc);

Vector list = ContentHelper.getApplicationData(holder);

Alas, to search the whole database for EPMDocuments using this approach take ages so I came up with an alternative approach.

Below sql will retrieve all identities of accelertor files in Windchill:

select ad.ida2a2 from applicationdata ad where ad.category='INSTANCE_ACCELERATOR_FILE'

Then I just use ReferenceFactory to get the actual istance of ApplicationData.

This search just takes a few minutes.

Now I just need to figure out how to get from the actual accelertor file (ApplicationData) to the EPMDocument that is holding it.

Any suggestions?

Best regards,

Peter

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to find ContentHolder from accelertor file?

Here is simple example:

select a.category from epmdocument e, epmdocumentmaster m, holdertocontent h, applicationdata a where e.latestiterationinfo='1' and e.ida2a2=h.ida3a5 and h.ida3b5=a.ida2a2 and e.ida3masterreference=m.ida2a2 and m.documentnumber='3565683';

4 REPLIES 4

Re: How to find ContentHolder from accelertor file?

Hi Peter,

I dont know or you can from ApplicationData go up to get the EPMDocuments with java API,

But you can do that with SQL query select right applicationdata and get right EPMDocument(IDA2A2) and then with API function query the real object.

Regards,

Vytautas

Re: How to find ContentHolder from accelertor file?

Hello Vytautas!

Thanks for the suggestion!

You wouldn't happen to have an idea how epmdocument and applicationdata tables are connected?

Best regards,

Peter

Re: How to find ContentHolder from accelertor file?

Here is simple example:

select a.category from epmdocument e, epmdocumentmaster m, holdertocontent h, applicationdata a where e.latestiterationinfo='1' and e.ida2a2=h.ida3a5 and h.ida3b5=a.ida2a2 and e.ida3masterreference=m.ida2a2 and m.documentnumber='3565683';

Re: How to find ContentHolder from accelertor file?

Excellent!

This is exactly the information I'm looking for!

Or more precicly the holdertocontent table linking the both tables.

Thanks alot!

Cheers!

/Peter