Skip to main content
Mar 18, 2021 6:12 PM UTC
Solved

Context renaming with API

Hello,

How to rename a container programmatically?

Thank you.

Mar 22, 2021 7:36 PM UTC

There seems to be this knowledge article, available on the Support site, with regards to renaming product containers;

 

Need to know the AP to rename a product container

https://www.ptc.com/en/support/article/CS235162

 

I'd suggest opening a Support case, to double-check, with one of the customization engineers.

 

Mike

 

5 replies

Mar 18, 2021 6:30 PM UTC

There is a Java method for this:

wt.pdmlink.PDMLinkProduct.setName(String)
wt.inf.library.WTLibrary.setName(String)
wt.projmgmt.admin.Project2.setName(String)

 

 

Not sure if there is a REST service for the same.

 

 

rzemmaliAuthor
Mar 19, 2021 6:03 PM UTC

I get this error when calling the setName() method:

 

Exception occurred: Changes to "Context Name" are restricted, once the object has been persisted.

Mar 18, 2021 6:48 PM UTC

you can also use setName() method of WTContainer

rzemmaliAuthor
Mar 29, 2021 1:39 PM UTC

same error with WTcontainer

Mar 22, 2021 7:36 PM UTC

There seems to be this knowledge article, available on the Support site, with regards to renaming product containers;

 

Need to know the AP to rename a product container

https://www.ptc.com/en/support/article/CS235162

 

I'd suggest opening a Support case, to double-check, with one of the customization engineers.

 

Mike