Hi All. I’m trying to set NEW user defined variables using Python macro with the following code
props = doc.getDocumentProperties().getUserDefinedProperties()
if not props.getPropertySetInfo().hasPropertyByName(name):
props.addProperty(name, 0, value)
And everything works if “value” has “string” type for example props.addProperty(‘par1’, 0, ‘val1’)
But if I try to set props.addProperty(‘par2’, 0, 1) I see an Illegal type error