IDLffShape::GetAttributes

The IDLffShape::GetAttributes function method retrieves the attributes for the entities you specify from a Shapefile.

Syntax

Result = Obj->[IDLffShape::]GetAttributes([Index] [, /ALL] [, /ATTRIBUTE_STRUCTURE] )

Return Value

Returns an anonymous structure array. For more information on the structure, see Attributes.

Arguments

Index

A scalar or array of longs specifying the entities for which you want to retrieve the attributes, with 0 being the first entity in the Shapefile.

Note: If you do not specify Index and the ALL keyword is not set, the attributes for the first entity (0) are returned.

Keywords

ALL

Set this keyword to retrieve the attributes for all entities in a Shapefile. If you set this keyword, the Index argument is not required.

ATTRIBUTE_STRUCTURE

Set this keyword to return an empty attribute structure that can then be used with the IDLffShape::SetAttributes method to add attributes to a Shapefile.

Examples

In the first example, we retrieve the attributes associated with entity at location 0 (the first entity in the file):

attr = myShape->getAttributes( 0)

In the next example, we retrieve the attributes associated with entities 10 through 20:

attr = myShape->getAttributes( 10+indgen(11) )

In the next example, we retrieve the attributes for entities 1,4, 9 and 70:

attr = myShape->getAttributes( [1, 4, 9, 70] )

In the next example, we retrieve all the attributes for a Shapefile:

attr = myShape->getAttributes( /ALL )

Version History

5.4

Introduced