sdaiGetAttrDefinitionBN


Returns a numeric attributeID that uniquely identifies an attribute definition instance in the EDMdatabase. The actual attribute is specified by the schema name and the entity name that uniquely identifies an 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 functions: sdaiGetAttrDefinition , sdaiGetEntity , edmiGetSchema
Header:
#include "sdai.h"
Prototype:
SdaiAttr sdaiGetAttrDefinitionBN(SdaiString   schemaName,
                                  SdaiString   entityName, 
                                  SdaiString   attributeName);       
Arguments:

schemaName

Name of the schema that defines the actual attribute. Schema names are case insensitive. This schema must exist as a dictionary model in the EDMdatabase.

entityName

Name of the entity that defines the actual attribute. Entity names are case insensitive.

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 cooridnatesId;
...
cooridnatesId = sdaiGetAttrDefinitionBN("PDM_Schema",
"Cartesian_Point", 
"Cooridnates"); 
if (! cooridnatesId) {
/* Error in operation */ 
printf("\nError: %s in sdaiGetAttrDefinitionBN \n", 
edmiGetErrorText(sdaiErrorQuery())); 
goto error; 
}
. . .