5.7 Accessing Custom Properties

It is possible to search for custom properties assigned to metamodel classes. Use the getattr() command.

The attr name requires the prefix metamodel.class. For example, assume there is a Service Model element named metamodel.class.SVG_Drawing. Use getattr() to search the Service Model element for an attribute named metamodel.class.SVG_Drawing or SVG_Drawing.

element.getAttr( 'metamodel.class.[AttrName]' )

If the attribute is found in the Service Model element, it returns the attribute. If the attribute is not found, it searches the metamodel class of the element. If the attribute is found in the class element, it returns the attribute.