Syntax for Properties

Properties can be set using the following syntax

OBJECT.setPropertyValue(PROPERTY, VALUE)

or:

OBJECT.setKeyedPropertyValue(PROPERTY, KEY, VALUE)

The value of properties can be retrieved using the following syntax:

VARIABLE = OBJECT.getPropertyValue(PROPERTY)

or:

VARIABLE = OBJECT.getKeyedPropertyValue(PROPERTY, KEY)

where OBJECT is a node or output, PROPERTY is the name of the node property that your expression refers to, and KEY is the key value for keyed properties.. For example, the following syntax is used to find the filter node, and then set the default to include all fields and filter the Age field from downstream data:

filternode = modeler.script.stream().findByType("filter", None)
filternode.setPropertyValue("default_include", True)
filternode.setKeyedPropertyValue("include", "Age", False)

All nodes used in IBM® SPSS® Modeler can be located using the stream findByType(TYPE, LABEL) function. At least one of TYPE or LABEL must be specified.