Share this page

# GetElementFrom<n>D<Type-Name>Array

Array Types and Functions

Retrieves an element of the specified type from a SafeArray.

    <Actual Type-Name> GetElementFrom<n>D<Type-Name>Array( <Type-Name>Array Array, int index1,..., indexn );

Array | An array of the specified type.
index1,..., indexn | The indices of the element to be retrieved.

The GetElementFrom<n>D<Type-Name>Array family of functions retrieves an element of a specified type from a SafeArray. The type of the return variable is an actual language type such as unsigned long, and not an lrc type such as ulong. VuGen generates these calls as commented out code that you can use to store variables for parameterization. To use the calls, uncomment them and assign the function return value to a variable of the proper type.

## Return Values

lrc Return Values

## Parameterization

Parameterization is not applicable to this function.

## Example

This example retrieves an element of a 3 dimensional byte array.

Copy code

           ShortArray Var;
           Var = Create3DShortArray(0, 2, 0, 3, 0, 4);
           PutElementIn3DShortArray(Var, 0, 0, 0, lrc_short("0"));
           PutElementIn3DShortArray(Var, 0, 0, 1, lrc_short("1"));
        ......
        GetElementFrom3DShortArray(Var, 0, 0, 0);     // expected value: 0
        GetElementFrom3DShortArray(Var, 0, 0, 1);     // expected value: 1
        ...

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: