CreateAttribute

Creates a new layer attribute.

 

JavaScript

 

CreateAttribute(

       AttributeName,

       attributeType,

       Size,

       Precision)

 

C#

 

void CreateAttribute(

       string AttributeName,

       AttributeTypeCode attributeType,

       int Size,

       [int Precision=15])

 

C++

 

HRESULT CreateAttribute(

       BSTR AttributeName,

       AttributeTypeCode attributeType,

       long Size,

       long Precision)

Parameters

AttributeName

A string that holds the attribute’s name.

attributeType

An enum that determines the attribute type. The following are the possible values:

·          AT_UNKNOWN = -1

·          AT_TEXT = 0

·          AT_INTEGER = 1

·          AT_DOUBLE = 2

Size

The size of the attribute (character length).

Precision

The number of decimal places. This property has effect only if the attributeType property is set to AT_DOUBLE.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.