getValue()

Reads graphics attribute values for a graphics object in variables.

Synopsis

int getValue(string shape, string attribute1, <type1_1> par1_1 [, <type1_2> par1_2 ...] [, string attribute2, <typ2_1> par2_1 [, <type2_2> par2_2 ...]])

Parameters

Parameter Description
shape Name of the graphics object
attribute1, attribute2 , ... Names of the attributes
par1 1, par1 2, ... Attribute contents

Return value

The return value is OK or if unsuccessful, -1.

Error

Description

The function getValue() writes any number of graphics attributes for a graphics object to a corresponding number of variables. String shape: Name of the graphics object as it can be specified in the attribute editor. If the shape is an empty string (""), its own graphics object will be addressed.

string attribute1 [...]

Name of the graphics atttribute.

<type1_1> par1_1 [...]

The parameter describing the graphics attribute. The number of parameters depends on the graphics attribute. A list of the parameters of the graphics attributes can be found in CONTROL Graphics.

Example

The following example assigns the contents of a text input or output field to the variable value.

main()
{
  getValue("","text",value);
}

Assignment of the coordinates of a shape to the variables x and y.

main()
{
  getValue("","position",x,y);
}

Assignment

Graphics

Availability

UI