Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi all,
Got the following exception thrown when using the method 'ListFeaturesByType':
--> com.ptc.Implementation.cipjava$XTypeMismatch
This used for scanning an assembly, and works fine. But as soon as I add a (custom) function to any of the relations on component level, the exception is thrown.
Any ideas on what is causing this? Can't find any info on this exception in the documentation.
- Using Wildfire 5
- Tried it on another pc, same result.
- If I keep trying, after about 10-20 times, the problem is solved and it works fine again. After save / re-open the problem starts again.
- Doen't matter what custom function I use, same result for all of them.
The only solution I found so far is to repeat the 'ListFeaturesByType' command until no exception is thrown...
Not really a good programming practice, but it works. Downside is this causes a delay of a few seconds, so not very useful if you have to repeat it many times.
PS: problem seems to be solved in Creo 2. Tried running the same code, no exceptions...