DspGetAnFromNameRelative
- Last UpdatedJul 18, 2023
- 1 minute read
Name used to retrieve the animation number (AN) of an object on the page relative to a given Animation Number(AN). Use the following 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.
See Referencing an Object using a Name at Runtime more information on the relative path syntax.
Note: When retrieving the AN for an object within a genie or super genie you need to use a relative path.
Syntax
DspGetAnFromNameRelative(hAN, sName)
hAN
AN used as the starting point for the search.
sName
The Name used as a reference for the AN.
Note: With an AN you can start the search from any level and not just the group you are in.
Return Value
AN of object or -1 if not found.
Related Functions
DspAnSetName, DspGetNameFromAn
Example
// example of relative pathing syntax
DspGetAnFromNameRelative(625, "..\..\..\Object1")
//Using another AN as browse starting point
DspGetAnFromNameRelative(639, "..\..\Object1")