The Relative Path

The relative path starts in the current name space—formed by all objects located within one Frame—or the Frame in which the Method object is located.

The relative path starts with an anonymous identifier, a name in the current name space or a built-in method. Then a period follows and the name of a Frame or a period and a built-in method. The last entry is a period and the name of the object or a period and a built-in method or a period and an attribute.

This table lists, where the relative path starts for the different objects:

User-defined attribute created for an MU

User-defined attribute created for an object

User-defined attribute created for a Frame

Built-in objects

Object variable

In the Frame in which the material flow object, on which the MU stays, is located.

In the Frame in which the material flow object is located.

Within that Frame.

In the Frame in which the object is located.

Method (current)

In the Frame in which the material flow object, on which the MU stays, is located.

In the Frame in which the material flow object is located.

Within that Frame.

In the Frame in which the object is located.

Table with column of data type object

The material flow object, on which the MU stays.

In the Frame in which the material flow object is located.

In the Frame into which you inserted that Frame.

In the Frame in which the object is located.

Note:

For user-defined attributes of static objects, the Frame in which the object is located is the starting point of the relative <Path>.

For user-defined attributes of the MU the static object on which the MU is located is the starting point of the relative path, independent of the fact that the location of the MU might be another MU.

Suppose that in the Method object M, which you inserted into a Frame, you would like to access the object named MA by employing a relative <Path>. The Method object is located in Frame W. The object MA is not located in the same name space as M and has to be identified by an additional <Path>. The object MA is located in the Frame that also contains the method M. The relative path begins with the name of the Frame in which the object is located, followed by a period and the object name.

Example

variable := AP.MA

In our second example the Method M is supposed to access the Store located in Frame L and to query the number of MUs. The Store is not located in the same Frame as the Method. Therefore, we will use an anonymous identifier.

The keyword current returns the current Frame. The method location/ ~ returns the Frame located above in the hierarchy of objects. From now on you can access L and the Store.

Example

Var := current.location.L.store.NumMU
Var := location.L.store.NumMU

When dragging and dropping an object onto a text box, Plant Simulation adds the relative path by default.

Related Topics

The Absolute Path

Object Reference