How to remove a custom property for a tag via scripting?

If I have a custom property in a tag, how could I remove it?

My current work around is this:

# pseudo code
tag = system.tag.getConfiguration("tag/path")
tag.pop("custom", None)
system.tag.configure("tag/path", tag, "o")

Is there a more direct way?
Thanks!

This seems to be the idiomatic way to do it. I wouldn’t call it a work around.

EDIT: You should probably check the pop value before you run the configure, no need to call it if the property did not exist.

1 Like