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

AVEVA™ Plant SCADA

DspGetAnFromName

  • Last UpdatedJul 18, 2023
  • 1 minute read

Name used to retrieve the AN of an object on the page. Use the following relative path syntax:

[RelativePath].[Group].[Group].Control

This will browse the group hierarchy to a specific starting point, and then drill down to other groups to find the named control or object.

If you do not use a relative path the system will first look for an object within the groups specified relative to the object the cicode is running on, and if the name is not found, it will then search the page for the first existence of the object name. See Referencing an object using a name at runtime for more information.

Note: When retrieving the AN for an object within a genie or super genie you need to use a relative path.

Syntax

DspGetAnFromName(sName)

sName

The Name of the object used as a reference for the AN.

Return Value

AN of object or -1 if not found.

DspAnSetName, DspGetNameFromAn

Example

// Example of relative pathing syntax
// Reference from a current group, symbol or genie
DspGetAnFromName(".\Object1")
// Navigate three levels up and from the root level search for Object1.
DspGetAnFromName("..\..\..\Object1")

See Also

Display Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in