Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

Status Control Pseudo-Attributes

  • Last UpdatedSep 05, 2022
  • 2 minute read

The following pseudo attributes are available on any controlled object.

Attribute

Qualifier

Returns

Remark

STVPRO

STADEF

STAVAL

Get the promote STAVAL element for the assigned STADEF.

STVDEM

STADEF

STAVAL

Get the demote STAVAL element for the assigned STADEF.

STVLST

STADEF array

Get all assigned STADEFs.

STVNUM

STADEF

integer

Get the numerical value for the assigned STAVAL.

STVDSC

STADEF

string

The description of assigned STAVAL.

STVCOM

STADEF

string

The current comment from the latest status command.

STVREA

STADER

string

The reason for the last status change.

STVNAM

STADEF

string

The name of the assigned STAVAL.

STVVAL

STADEF

STAVAL

The current STAVAL for the STADEF.

STVLNK

STADEF

STALNK

Ref to the STALNK element (internal).

STVASD

STADEF array

Get all eligible STADEFs, may include currently assigned.

STVTRV

STADEF array

Get valid transitions from current STVVAL.

STVUNR

REF array

Get a list of unresolved STAVAL references from associated STALNKs.

STVMOD

STADEF

String

Status last modification date.

STVUSE

STADEF

String

Status last modified by User.

The following pseudo-attributes are available on Status Definitions (STADEF).

Attribute

Qualifier

Returns

Remark

STVREF

string/number

STAVAL

Get the STAVAL with the given name or number (NUMVAL).

STVUSD

REF array

All elements controlled by this STADEF.

The following pseudo attributes are available on Status Values (STAVAL).

Attribute

Qualifier

Returns

Remark

STVDDT

STADEF

Datetime

Status Delegation date.

STVDEM

STAVAL

Get the demote STAVAL element from this STAVAL.

STVDOF

STADDEF

String

Status Delegate of.

STVPRO

STAVAL

Get the promote STAVAL element from this STAVAL.

STVUSD

REF array

All elements controlled by this STADEF and with this STAVAL current.

To query a qualified pseudo attribute on the command line, enter the qualifier in brackets noting the space required in front of the closing bracket, e.g.

Q STVVAL(/DesignStatus )

This will return the name of the status value, e.g. /WorkPending.

To obtain this information in PML2, add the required status definitions into an array and use the qualified attribute method as illustrated below.

!statusDefinitions[1] = /DesignStatus

!statusValues = !!ce.attribute('STVVAL', !statusDefinitions)

In this example the first element of the status values array will now be set to the status value object, e.g.

Q var !statusValues[1].desc

This will return the string 'Work Pending'.

When using status value as a condition in a collection, a command like the following will not return the expected objects:

var !myItems collect all equi with (stvval( /EquipmentDesignStatus )

eq /Approved )

This is because the name of the status value is local to the definition (so that the same name can be used in multiple definitions). Instead use one of these:

var !myItems collect all equi with (stvnam( /EquipmentDesignStatus )

eq '/ Approved')

var !myItems collect all equi with (stvnum( /EquipmentDesignStatus ) gt 75)

TitleResults for “How to create a CRG?”Also Available in