Quantcast
Channel: PTC Community : All Content - Piping, Cabling & Schematics
Viewing all articles
Browse latest Browse all 557

Java method not working - getDatatables

$
0
0

I'm trying to write a Java function that searches the external catalog using the method getDatatables:

 

//get the datatables matching the specified partnumber

Condition condition = new SimpleCondition("part_number", "eq", value);

Condition[] conditions = {condition};

Iterator components = design.getDatatables(conditions, true, true);

 

The third parameter in the getDatatables call is supposed to search the external catalog, but unfortunately I'm getting a NullPointerException when trying to read a central catalog file:

 

java.lang.NullPointerException

        at rsdesigner.design.DatatableCCSearch.readFile(DatatableCCSearch.java:177)

        at rsdesigner.design.DatatableCCSearch.readCCFiles(DatatableCCSearch.java:110)

        at rsdesigner.design.DatatableCCSearch.readCCFiles(DatatableCCSearch.java:103)

        at rsdesigner.design.DatatableCCSearch.readCCFiles(DatatableCCSearch.java:103)

        at rsdesigner.design.DatatableCCSearch.findCCDatatables(DatatableCCSearch.java:76)

        at rsdesigner.design.Design.getDatatables(Design.java:227)

 

I'm using Creo 2.0 M010. Does anyone know if it's fixed in a later build of 2.0, or in 3.0?

 

What's worse is that I do actually get at least one PropertySet returned but it seems to be incomplete, so I can't actually scan the results anyway!

 

Thanks

 

Martin


Viewing all articles
Browse latest Browse all 557

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>