Skip to main content
12-Amethyst
Solved

Context renaming with API

Hello,

How to rename a container programmatically?

Thank you.

5-Regular Member

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

3-Newcomer

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.

 

 

Translate
rzemmali12-AmethystAuthor
12-Amethyst

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

 

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

Translate
16-Pearl

you can also use setName() method of WTContainer

Translate
rzemmali12-AmethystAuthor
12-Amethyst

same error with WTcontainer

Translate
5-Regular Member

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

 

Translate