Copy link to clipboard
Copied
Hello!
I want to save some information I create via python to a new metadata property. Is this possible?
I can see it's possible using pysbs, but I assume that's for when I don't have designer open already, can I use pysbs functions inside designer?
Thanks!
if you have a package object, you can do something like this:
metadata = package.getMetadataDict()
metadata.setPropertyValueFromId("key", SDValueString.sNew("value"))
I don't see the sd api reference online, but from Designer if you click "Help"->"Scripting Documentation", you should be able to find what you're looking for in the API to create and retrieve metadata
Copy link to clipboard
Copied
if you have a package object, you can do something like this:
metadata = package.getMetadataDict()
metadata.setPropertyValueFromId("key", SDValueString.sNew("value"))
I don't see the sd api reference online, but from Designer if you click "Help"->"Scripting Documentation", you should be able to find what you're looking for in the API to create and retrieve metadata
Copy link to clipboard
Copied
Amazing, this is exactly what I was hoping for, thank you so much!
I had assumed the key needed to exist before I could use setPropertyValueFromId, but you don't!
Thanks again! 🙂