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 »


 
The functions edmiReadStepFile and edmiImportStepFile can create a STEP identifier model that holds the correspondence between an instance identifier on the STEP file (stepID) and the instanceID of the same instance in the EDMdatabase. This function will return the numeric instanceID that corresponds to the specified numeric stepID.
Note: No STEP identifier model can be created when the ADD_TO_EXISTING_MODEL option is enabled in the edmiReadStepFile or the edmiImportStepFile operation
The actual data model must be open before this function can be successfully performed.
Related functions: edmiGetStepIdOfInstance , edmiReadStepFile , edmiImportStepFile.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetInstanceOfStepId(SdaiModel       modelId,
                                   SdaiInteger     stepId, 
                                   SdaiAppInstance *instId); 
Arguments:

modelId

A numeric modelID that uniquely identifies the data model of interest in the EDMdatabase. This is the data model created by the edmiReadStepFile function when the related STEP file was read into the EDMdatabase.
The modelID is returned from the functions: sdaiCreateModel , sdaiCreateModelBN , sdaiOpenModelBN , edmiGetModel , edmiGetModelBN , sdaiGetInstanceModel

stepID

A numeric identifier that uniquely identifies an entity instance on the STEP file that was imported into the specified data model in the EDMdatabase.

instId

Address of a variable that will receive a numeric instanceID that uniquely identifies the instance in the EDMdatabase that corresponds to the specified stepID in the related STEP file.

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
SdaiAppInstance instId;
EdmiError rstat;
SdaiInteger stepId;
SdaiModel modelId;
. . .
if (rstat = edmiGetInstanceOfStepId (modelId, stepId, &instId)) {
/* Error in operation */ 
printf("\nError: %s in edmiGetInstanceOfStepId \n", 
edmiGetErrorText(rstat)); 
goto error; 
}
printf("\nstepId: #%lu = instanceId: %lu", stepId, instId);
. . .

  • No labels