Dotted notation

Syntax

variableName.name1(arguments1).name2(arguments2) ... .nameN(argumentsN)

where:

Description

MQL uses a dotted notation to traverse an object tree. Starting with an object, the dot indicates a call to one of the property, method or script of that object. The number of dot is endless, you can traverse as far as you like across objects.

If a property or method returns null at any level of a chain, then the result will be null (rather than throwing an exception). See Null management for more information.

If a property or method returns a collection at any level of a chain, MQL will iterate by itself on this collection to evaluate the rest of the chain. See Collection iteration for more information.

Examples

// Gets the name of the class and call the toUpperCase method() on it
myClass.name.toUpperCase()

// Returns the upper case name of the package of the attribute's type
myAttr.type.package.name.toUppercase()

// Returns a list containing the name of each feature of each class of a model
myModel.getInstances("Class").feature.name