sdaiGetAttrDefinition


Returns a numeric attributeID that uniquely identifies an attribute definition instance in the EDMdatabase. The actual attribute is specified by a numeric entityID that uniquely identifies the entity definition instance in the EDMdatabase that defines the actual attribute, and the attribute name. The attribute name must be qualified by the appropriate entity name when the attribute name is not unique within the actual entity.
The dictionary model that holds the actual attribute definition instance must be open before this function can be successfully performed.
The returned attributeID can be used to identify the actual attribute in subsequent EDMinterface operations. The returned attributeID will be a constant value throughout the lifetime of the actual attribute definition instance in the EDMdatabase.
Related function: sdaiGetAttrDefinitionBN , sdaiGetEntity , edmiGetSchema
Header:
#include "sdai.h"
Prototype:
SdaiAttr sdaiGetAttrDefinition(SdaiEntity  entity,
                                SdaiString  attributeName); 
Arguments:

entity

A numeric entityID that uniquely identifies the actual entity definition instance in the EDMdatabase that defines the actual attribute.
The entityID is returned by a sdaiGetEntity operation.

attributeName

Name of the actual attribute. Attribute names are case insensitive. The attribute name must be qualified with the entity name when the attribute name is not unique within the entity.

Returns:
A numeric attributeID that uniquely identifies the attribute definition instance in the EDMdatabase that defines the actual attribute.
attributeID != 0 : operation successfully performed.
attributeID = 0 : operation failed, use sdaiErrorQuery function to get error reason.
Example:
SdaiEntity pointId;
SdaiAttr xId;
...
xId = sdaiGetAttrDefinition (pointId, "X");
if (! xId) {
/* Error in operation */ 
printf("\nError: %s in sdaiGetAttrDefinition \n", 
edmiGetErrorText(sdaiErrorQuery())); 
goto error; 
}
. . .