The function edmiReadStepFile 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 stepID that corresponds to the specified numeric instanceID.
The actual data model must be open before this function can be successfully performed.
Note: No STEP identifier model can be created when the ADD_TO_EXISTING_MODEL option is enabled in the edmiReadStepFile or the edmiImportStepFile operation
Related functions: edmiGetInstanceOfStepId , edmiReadStepFile , edmiImportStepFile.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetStepIdOfInstance(SdaiAppInstance instId,
SdaiInteger *stepId);
Arguments:
instId |
A numeric instanceID that uniquely identifies the instance in the EDMdatabase to find the corresponding step identifier of. |
stepID |
Address of a variable that will receive the numeric stepID that corresponds to the instance specified by the instId argument. This stepID can be used to identify the actual entity instance on the STEP file that was imported into the EDMdatabase when the actual instance was created in EDMdatabase. |
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;
. . .
if (rstat = edmiGetStepIdOfInstance(instId, &stepId)) {
/* Error in operation */
printf("\nError: %s in edmiGetStepIdOfInstance\n",
edmiGetErrorText(rstat));
goto error;
}
printf ("\nInstanceID: %lu corresponds to StepID: %ld", instId, stepId);
. . .