is there a way to move a tag by using script? I have to move a tag from a folder called “temp” to the main folder
There’s no way to move a tag - you can only remove it and re-create it in the new location.
ok. So the solution I am using now is the only one that is possible. Thank you for the reply
You can get this functionality using system.tag.browseConfiguration and system.tag.configure.
Here is a very hard coded example. It might be easier to convert the TagConfigSet to JSON and deal with it that way, but this works for your example.
t = system.tag.browseConfiguration("temp",True) print t.properties for p in t.properties: if p.name == "path": break else: p = None op = t.fullPath if p is not None: t.set(p,"") print t.toJSON() system.tag.configure(path = "",tags=t,collisionMode = "Abort") system.tag.removeTag(op)
Thank you Kyle but that script is not working as expected as the tag I have to move is an UDT instance. So if I run this script it will take just the first tag inside the instance and move it to the main folder
It will work, just move the udt itself, by changing its path.