Skip to main content
12-Amethyst
March 18, 2021
Solved

Context renaming with API

  • March 18, 2021
  • 3 replies
  • 3218 views

Hello,

How to rename a container programmatically?

Thank you.

Best answer by MichaelChatel

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

 

3 replies

1-Visitor
March 18, 2021

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.

 

 

rzemmali12-AmethystAuthor
12-Amethyst
March 19, 2021

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

 

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

16-Pearl
March 18, 2021

you can also use setName() method of WTContainer

rzemmali12-AmethystAuthor
12-Amethyst
March 29, 2021

same error with WTcontainer

5-Regular Member
March 22, 2021

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