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

We are happy to announce the new Windchill Customization board! Learn more.

Parts created using "Import from Spreadsheet" are not fetched

prathi
1-Newbie

Parts created using "Import from Spreadsheet" are not fetched

Hi, We have Windchill-SAP Integration. We created parts using import from spreadsheet in Windchill. We have created a Utility such that it would give a list of all parts which are in "PREPRODUCTION" state, but upon running that utility, the parts created using "Import from Spreadsheet" were not displayed in the list while other were.

We also have another utility we gives us the list of all parts that created after a certain date and are in a certain life cycle state, but similarly upon running that utility, the parts created using "Import from Spreadsheet" were not displayed in the list while other were.

How to resolve this problem?

1 ACCEPTED SOLUTION

Accepted Solutions
prathi
1-Newbie
(To:prathi)

Hi Bhushan,

We resolved it using getcreateTimestamp for the part master of the parts created using import from spreadsheet and for remaining the above given logic was used.

View solution in original post

4 REPLIES 4
BhushanNehe
14-Alexandrite
(To:prathi)

Hi Prasad,

Do you see the part from Windchill UI? Can you share more details about the code used in your utility to fetch these parts?

Regards,

Bhushan

prathi
1-Newbie
(To:prathi)

Hi Bhushan,

As you can in the image below, when we create the part from Import from Spreadsheet, the Timeline History is blank.

In this case, when we run our utilities to fetch our parts, these imported parts are not displayed.

Havells 011.PNG

But then if I revise the part or create an instance such that the Timeline History displays something, the imported parts are fetched in the utilities we run.

Havells 012.PNG

The code which we have written is :

QueryResult partLCHistory = LifeCycleHelper.service.getHistory(

        part, true);

if (partLCHistory.hasMoreElements()) {

          LifeCycleHistory partHistory = (LifeCycleHistory)partLCHistory

            .nextElement();

          Timestamp partStateChangeTime = partHistory

            .getModifyTimestamp();

          Timestamp currentTimestamp = new Timestamp(

            new Date().getTime());

          logger.debug("timestamp  :" +

            (currentTimestamp.getTime() - partStateChangeTime

            .getTime()) / 3600000L);



This is common for our utilities.

Please suggest how should we proceed now to get these imported parts.

Regards,

Prasad

BhushanNehe
14-Alexandrite
(To:prathi)

Hi Prasad,

Your findings are correct, if the part is created from spreadsheet there is no timeline history generated. In your code, when you query for the part history LifeCycleHelper.service.getHistory you already have the part object with you. Can you not modify the code to check if there is no history return just the part and the create timestamp.

Regards,

Bhushan

prathi
1-Newbie
(To:prathi)

Hi Bhushan,

We resolved it using getcreateTimestamp for the part master of the parts created using import from spreadsheet and for remaining the above given logic was used.

Top Tags