Show Attributes and Methods (described)

The context menu command Show Attributes and Methods shows the attributes and methods of the selected object.

Note:

Plant Simulation only shows the column with the German names of the SimTalk functions when:

You are working on a computer that runs the German version of Windows.

You selected German as the model language of your simulation model.

Working with the Dialog Show Attributes and Methods shows how you can utilize the information to work even more efficiently.

The window lists the following:

  • The Name of the attribute, of the read-only attribute, or of the method in the leftmost column. Click the arrow to sort the column Name alphabetically.

  • The current Value of the attribute, of the read-only attribute, or of the method.

  • If the value is inherited ✔ or not inherited - or neither inherited nor not inherited (no entry).

  • If a waituntil instruction can observe the attribute or the method (asterisk, *) or not (no asterisk). Click the arrow to sort the column Watchable.

  • The Signature, i.e., the data type or data types of its parameters. Click the arrow to sort the column Signature according to the signature.

    • For attributes the data type of the value, which you can assign, and the data type of the return value is shown after the arrow ->.

    • For methods the data type of the value of the parameter, which you can assign and the data type of the return value is shown after the arrow ->. If a parameter has a default value set by us, the signature shows it after the assignment operator:=.

      The signature shows optional parameters in square brackets, for example [OptionalParameter].

Let us demonstrate how to interpret the information the dialog presents:

  • Show Attributes

    To only show the attributes of the object, we click on on the toolbar of the dialog.

    In our example below the Name of the attribute is CurrIcon, it expects the value to be passed as a string, its current value is operational, this value is inherited and a wait until instruction in Plant Simulation can observe it.

  • To edit the value, double-click the name of the attribute. The title bar of the dialog that opens shows the entire path to the object.

    Type in the new value into the text box or select the new value from the drop-down list.

    You can also change Inheritance of the value of the attribute by clicking the toggle button for inheritance. The column Inherited the shows the changes state of inheritance.

  • To change the value of a boolean attribute from true to false and vice versa, double-click the row in the list. A boolean attribute shows ✔ for inherited or - for not inherited in the column Inherited.

    To turn inheritance on again if it has been turned off, double-click into the respective cell in the column Inherited.

  • To change the value of an attribute of data type string, first sort the column Signature according to the data type and scroll to the data type string. Then, double-click the respective attribute and select another value in the drop-down list.

    Examples for such attributes are the values of the drop-down lists in the dialogs of the objects.

  • Let’s have a look at the attribute ConnectCtrl. It expects to be passed the path to the method to be executed; its current value is VOID, its value is inherited and a waituntil instruction in Plant Simulation cannot watch/observe it.

    The type method in the Signature usually is the path to a Method object. In most cases it will be the same as the type object. In some cases you will have to type & (SimTalk 2.0) ref (SimTalk 1.0) in front of the name of the Method within SimTalk statements to prevent the Methodfrom being executed.

  • Show Read-Only Attributes

    To only show the read-only-attributes of the object, we click on on the toolbar of the dialog.

    In our example the Name of the Read-Only Attribute is NumSucc. It has the value 1 at the point-in-time of our query. The return value has the data type integer.

  • Show Methods

    To only show the methods of the object, we click on on the toolbar of the dialog.

    Let’s have a look at the method deleteAttr. The cell Signature shows the data type of the parameter you have to enter in parenthesis, string in this case, and it shows the data type of the return value to the right of the keyword ->, boolean in this case. If the Method has optional parameters, they are listed within square brackets.

The Auto Complete window in the method editor provides the same functions.

Instead, you can also right-click the object in the Frame and select Show Attributes and Methods on the context menu or press the F8 key.

Related Topics

Working with the Dialog Show Attributes and Methods

attributeWatchable