Quantcast
Channel: PTC Community : Unanswered Discussions - Windchill
Viewing all articles
Browse latest Browse all 3592

Code having Error..

$
0
0

Hi All,

Below code giving some error, how i can fix this and get WTPartsusesby

 

Thanks,

Vivek

 

try{

        WTPart part = null;   

        wt.fc.QueryResult qr=wt.part.WTPartHelper.service.getUsesWTPartMasters(part);

        if(qr.hasMoreElements()){

            System.out.println(part.getNumber()+"----Has----Child---"+qr.size());

            wt.part.WTPartMaster partMaster = (WTPartMaster)part.getMaster();

            wt.fc.QueryResult qr_parents = wt.part.WTPartHelper.service.getUsedByWTParts(partMaster);

       

            while(qr_parents.hasMoreElements()) {                                                    

                wt.part.WTPart parentPart = (wt.part.WTPart) qr_parents.nextElement();

               System.out.println(partMaster.getNumber()+"----Has----Parents---"+parentPart.getName());

               wt.part.WTPartMaster parentMaster = (WTPartMaster)parentPart.getMaster();

               wt.fc.QueryResult qr_grandpa = wt.part.WTPartHelper.service.getUsedByWTParts(parentMaster);

            }

           

        }

        }


Viewing all articles
Browse latest Browse all 3592

Trending Articles



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