sdaiUnsetAttr


Set the specified attribute value in the specified instance to indeterminate, i.e. the actual attribute value will be unset such that a following sdaiTestAttr and sdaiTestAttrBN operation on the same attribute in the same instance will return sdaiFALSE. The functions sdaiGetAttr , sdaiGetAttrBN , sdaiGetAttrs , and sdaiGetAttrsBN on the same attribute will fail until a new value is assigned to the actual attribute. When the actual attribute value is an aggregate, this aggregate and all child aggregates will be deleted by this operation.
All attributes in an instance will have the value indeterminate, i.e. unset until a value is assigned by one of the following operations: sdaiPutAttr , sdaiPutAttrBN , sdaiPutAttrs , sdaiPutAttrsBN , sdaiCreateAggr , sdaiCreateAggrBN .
This operation is only applicable to Explicit attributes in application instances.
The model that holds the actual instance must be open for write access before this operation can successfully be performed.
Related functions: sdaiUnsetAttrBN , sdaiTestAttr , sdaiTestAttrBN , sdaiGetAttr , sdaiGetAttrBN , sdaiGetAttrs , sdaiGetAttrsBN , sdaiPutAttr , sdaiPutAttrBN , sdaiPutAttrs , sdaiPutAttrsBN , sdaiCreateAggr , sdaiCreateAggrBN .
Header:
#include "sdai.h"
Prototype:
void sdaiUnsetAttr(SdaiAppinstance appinstance,
                    SdaiAttr        attribute); 
Arguments:

appinstance

A numeric instanceID that uniquely identifies application instance of interest in the EDMdatabase.
The instanceID is defined by a sdaiCreateInstance or a sdaiCreateInstanceBN function.

attribute

A numeric attributeID that uniquely identifies the attribute definition instance in EDMdatabase that defines the actual attribute in the instance <instance> that will be assigned the value indeterminate, i.e. that will be unset.
The attributeID is returned by the sdaiGetAttrDefinition and sdaiGetAttrDefinitionBN functions.

Returns:
Void – use sdaiErrorQuery to check for error in operation.
Examples:
SdaiAppinstance anInst;
SdaiAttr attrId;
SdaiErrorCode errCode;
...
sdaiUnsetAttr(anInst, attrId);
if (errCode = sdaiErrorQuery()) {
/* Error in operation */ 
printf("\nError: %s in sdaiUnsetAttr \n", 
edmiGetErrorText(errCode)); 
goto error; 
}
. . .