This functionality is only available for certain module packages.

You are here: Reference > Formula Language > Recurrent formulas > Determining the Position Within a Collection

Determining the Position Within a Collection

It is often required to determine the position of a mechatronic object within the children of a mechatronic component

mc.mos.indexOf(this)

This applies if the first object has the index "0". If the count should start at "1" the formula is to be extended as follows:

mc.mos.indexOf(this)+1