Home Search

DriveWorks Solo 22
MyName

Send Feedback

MyName

Gets the name assigned to the owner of the rule, this works for rules attached to items that have names such as variables and form control properties.

Syntax

MyName([Index])

Where:

Index (optional) is the index specifying the part of the owners name to return.

When Index is used:
  • A positive number will count the part to return from the left
  • A negative number will count the part to return from the right
  • 0 (zero) is not a valid Index

Examples

Rule

Meaning
Data and Form Controls - see How To: reference Control Properties.
MyName()

MyName(2)

MyName(-2)

When applied to a variable named TotalCost will result in DWVariableTotalCost

MyName(1)When applied to a variable named TotalCost will result in DWVariable
MyName(-1)When applied to a variable named TotalCost will result in TotalCost
MyName()

MyName(2)

MyName(-2)

When applied to a dynamic form control property the result will be the name of the control followed by the property name, for example:

  • ControlNameEnabled
  • ControlNameVisible
  • ControlNameError
  • ControlNameMin
  • ControlNameMax
  • ControlNameListData
  • ControlNameWidth
MyName(1)

When applied to a dynamic form control property the result will be:

  • ControlName
MyName(-1)

When applied to a dynamic form control property the result will be:

  • Enabled
Data (Variables, Constants and Tables) and Form Controls only have two parts to their name.

The Index range can only be in the range of -2 to 2 or an error will be returned.

Model Rules (see Model Rules General) and Drawing Rules (see Drawing Rules General).
The following Model Rule parameter is made up of 5 parts:

Trailer Assembly\Trailer Door Assembly\Trailer Frame Assembly\Trailer Door\Height

The examples below show which parts will be returned using no Index, positive Index and negative Index.

MyName()

MyName(5)

MyName(-5)

Will return all 5 parts:

Trailer Assembly\Trailer Door Assembly\Trailer Frame Assembly\Trailer Door\Height

The Index 5 or -5 will need to be adjusted for parameter lengths greater or less than 5 to return all of the parts.
MyName(1)Will return the first part from the left:

Trailer Assembly

MyName(-1)Will return the first part from the right:

Height

MyName(3)Will return the first three parts from the left:

Trailer Assembly\Trailer Door Assembly\Trailer Frame Assembly

MyName(-3)Will return the first three parts from the right:

Trailer Frame Assembly\Trailer Door\Height