Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
Returns the attributeID of all attributes belonging to the specified entity definition instance. Redeclared and inherited attributes will also be returned. The inherited attributes will be returned first in the resulting buffer, hence the order of the attributes is the same as the order on a STEP Physical File and as displayed by the EDMsupervisor Schemata>FlattenEntity command. An attributeID uniquely defines an attribute definition instance in an EDMdatabase.
NOTE: In this context entity definition also represents a view_entity, and an attributeID also represents a view_entity attributeID.
The dictionary model that contains the specified entity definition or view_entity instance must be open before this operation can be successfully performed.
Related functions: sdaiGetEntity , sdaiGetAttrDefinition , sdaiGetAttrDefinitionBN
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetAllAttrsOfEntity(SdaiEntity  entity,
                                   SdaiInteger *nAttributes, 
                                   SdaiAttr    *attributes); 
Arguments:

entity

A numeric entityID that uniquely identifies the entity definition or view_entity instance of interest in the EDMdatabase.
The entityID is returned by the sdaiGetEntity function.

nAttributes

This argument has an in-value and an out-value:
In-value: The maximum number of attributeID to receive. This should normally be the number of attributeID that can be placed in the buffer specified in the <attributes> argument.
Out-value: The actual number of attributeID returned in the <attributes> argument.

attributes

Address of the buffer in the calling application that will receive the attributeID of all attributes that belongs to the specified entity definition or view_entity instance. Redeclared attributes and inherited attributes will be included in the returned set of attributes. The order of the attributes is as described in ISO 10303 Part 21.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
int i;
EdmiError rstat;
SdaiInteger nAttributes;
SdaiEntity personId;
SdaiAttr attributes[MAX_ATTRS];
. . .
nAttributes = ATTRS;
if (rstat = edmiGetAllAttrsOfEntity(personId,
&nAttributes, 
attributes)) { 
/* Error in operation */ 
printf("\nError: %s in edmiGetAllAttrsOfEntity\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
/* Print out the instanceId of the attributes */
for (i = 0; i < nAttributes; i++) {
printf("\nattributeId: %12lu",attributes[i]);
}
. . .

  • No labels