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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Accesing Windchill folder contents

KF_8296660
2-Explorer

Accesing Windchill folder contents

Hi everyone,

We're attempting to create a simple applet in Thingworx that accesses our windchill repo. So far we've been able to create queries that can fetch our available container and folder types. However, we are unable to access the objects (ei. parts, process plans, documents) contained within the folders by using a conventional query.

The Windchill extension query service takes:

var params = {

containerUfid:   /* STRING    OR:wt.pdmlink.PDMLinkProduct:2559991*/,

criteria:  /* STRING */,

type:  /* STRING */,

dataShape: /* DATASHAPENAME */

};

After using our subfolder obid in our queries, we got the following error:

Wrapped com.ptc.jws.service.com.ptc.windchill.ws.Exception_Exception: com.infoengine.util.IEException: java.lang.ClassCastException: wt.folder.SubFolder cannot be cast to wt.inf.container.WTContainer Nested exception is: java.lang.ClassCastException: wt.folder.SubFolder cannot be cast to wt.inf.container.WTContainer; nested exception is: wt.util.WTException: java.lang.ClassCastException: wt.folder.SubFolder cannot be cast to wt.inf.container.WTContainer Nested exception is: java.lang.ClassCastException: wt.folder.SubFolder cannot be cast to wt.inf.container.WTContainer Cause: com.infoengine.util.IEException: java.lang.ClassCastException: wt.folder.SubFolder cannot be cast to wt.inf.container.WTContainer Nested exception is: java.lang.ClassCastException: wt.folder.SubFolder cannot be cast to wt.inf.container.WTContainer; nested exception is: wt.util.WTException: java.lang.ClassCastException: wt.folder.SubFolder cannot be cast to wt.inf.container.WTContainer Nested exception is: java.lang.ClassCastException: wt.folder.SubFolder cannot be cast to wt.inf.container.WTContainer

Note: We've been using the container and folder "obid" properties to navigate and query folders.

2 REPLIES 2
mgoel
17-Peridot
(To:KF_8296660)

Kevin Fuerte Could you please post this query on Windchill Questions - PTC User Community so that Navigate/Windchill customization team can review and provide details.


Regards,

Mohit Goel

Hi,

 

I tried to recreate the issue. The input parameter 'containerUfid' does not seem to take subfolder ufids. It takes only the product container oid. So a solution i can think is that make a query on the Container OID which will return all the subfolder objects. The write a query on the 'folderingInfo--parentFolder' column of the result infotable for the corresponding subfolder id. The second query will provide you the filtered list of objects within the particular subfolders.

Thanks and regards,

SaranKarthick

Announcements


Top Tags