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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Changing a state of a WTPart using Import from Spreadsheet

mdrum
6-Contributor

Changing a state of a WTPart using Import from Spreadsheet

I can successfully create new WTParts in Windchill PDMLink using "Import from Spreadsheet" where I set the initial revision and state of those objects.  However, when I go to modify parts using the import functionality, the revision changes according to my spreadsheet, but the state does not.  I am using Windchill 12.0, so the ability to change the state on import is available.  My columns are in the order specified in the help documentation (though even that says that it is not necessary).  

 

The behavior is this:  

- Parts that are changing revision revert the state back to the initial state of the lifecycle, regardless of which state I specify in the spreadsheet.

 

Spreadsheet Import Action: Modify part from Rev A Prototype to Rev B Production

Result:

A.2 PROTOTYPE -> B.1 IN WORK (even though I set the state in the spreadsheet to PRODUCTION)

 

- Parts that are not changing revision will iterate, but keep the state that they currently are at, regardless of which state I specify in the spreadsheet.

 

Spreadsheet Import Action: Modify part currently at Rev A Prototype to Rev A Production

Result:

A.2 PROTOTYPE -> A.3 PROTOTYPE (even though I set the state in the spreadsheet to PRODUCTION)

 

I have confirmed that my internal ID for the state is correct - as I created a bunch of test parts where I set each to a different state in the lifecycle just to confirm that it doesn't have any issues recognizing the state ID.

 

I do have a support call open with PTC, but I am also reaching out here to see if anyone else has encountered this, and found a solution.  Thank you in advance.

7 REPLIES 7
Hari_Vara
13-Aquamarine
(To:mdrum)

Hi,

Are you using wcadmin or some other user? pls specify. 

If using normal user, the issue could be that the LC Template State Transitions override the spreadsheet specification. (I think its good in that sense).

Please check the logs on method server, you will find the reason for this.

Rgds

Hari

mdrum
6-Contributor
(To:Hari_Vara)

Hello @Hari_Vara ,

 

I was doing the import using an account with Product Manager rights on the container where the objects reside.  I also tried using an Org Admin account.  Finally, I did set the transitions in the lifecycle template to explicitly define "Set State" on the Prototype Phase to go to Production.  None of those made any difference.

 

My parts are currently at Prototype, and I'm using the import to try to change them to Production.  So that should have worked.  Incidentally, I was working with my Windchill Site Admins on this and we checked all logs, and based on our current logging, we found nothing - no errors, warnings, or even events at the time we did the import.  The validation for the import was successful as well - so it didn't throw up any errors.  So I'm at a loss as to why it is not able to do what I can do manually in the product context, unless something about my spreadsheet is incorrect - but I created a bunch of new parts at the various states to make sure that my callout of state was correct, and that worked without any issues.  So it is just modifying them from one state to another that seems to be broken.

 

Thank you for your suggestion regardless.

Hari_Vara
13-Aquamarine
(To:mdrum)

Hi,

Thanks for a thorough analysis!

Based on your observations , what I can think is that the Import Tool might not be perfectly developed. As MS logs also seems not captured. 

If you really want to change LC states of a hug number of objects (which seems to be the only solution as on today due to import gap), then i think you can move all these objects to a new folder. May be use import to do that !

Then go to that folder and select all and then change the LC using set state in one shot !

 

We can wait for your update from TS., 

Best Regards

Hari

HelesicPetr
22-Sapphire I
(To:mdrum)

Hi @mdrum 

Nice to see that you really tried to find a root case.

I've never tried to change state by spreadsheet so I do not know if it works.

 

So where do you find the information that it should work? 

 

If there is not any preference or property to drive the behavior then it seams that the import from spreadsheet does not support the life cycle state change. 

I can be wrong and I am just curious where the information is written 

 

PetrH

mdrum
6-Contributor
(To:HelesicPetr)

Petr,

 

In the PTC Support Documentation for Windchill 12, there is a page called "File Format for Importing Parts" (https://support.ptc.com/help/wnc/r12.0.2.0/en/#page/Windchill_Help_Center%2FImExFileFormatParts.html%23) which has a table listing all of the various attributes that are required or optional for both initial import as well as re-import.  

 

In the table column entitled "Editable upon reimport" it lists "State" as "Yes" - which means that when you modify a part through an import, you can change the state.

 

Unfortunately, while there are examples showing how to do the initial import to create parts, I have not found any documentation showing an example of using an import to modify parts, so I'm mostly just trying out things to see how it works - and so far, I have been successful in modifying name, revision, quantity, location, classification and its attributes, and other IBAs on the part object directly.  The only thing I am unsuccessful in modifying is the state.

HelesicPetr
22-Sapphire I
(To:mdrum)

Hi @mdrum 

My first question would be is your lifecycle template defined to use set state ?

Set state transaction between prototype and production, and inwork and prototype..

If not I can understand why the change state is not done

PetrH

mdrum
6-Contributor
(To:HelesicPetr)

Hello @HelesicPetr ,

 

I am using a Product Manager account, which has full rights to everything, and I can manually set the state on the test objects to the desired state (from PROTOTYPE to PRODUCTION).  Just for the heck of it, I also tried it as an Org Admin account, and then, when that too didn't work - I did update the lifecycle template for the "PROTOTYPE" phase to explicitly define "Set State" for Production.  

 

That still didn't fix the problem.  So, it seems permissions is not the issue, nor the lifecycle template.

 

Thank you for the suggestion, however.  It is always worth giving it a shot.

Top Tags