Imports a STEP Physical File into the remote EDMdatabase specified by the given server context. By default the imported data will be stored in a new edmModel. Optionally the imported data may be added to an existing edmModel.
The Express schema that defines the structure in the Data Section of the actual STEP file must exist as a dictionary model in the remote EDMdatabase before this function can be successfully executed. The name of this Express schema is found in the attribute FILE_SCHEMA.SCHEMA_IDENTIFIERS in the Header Section of the STEP file. See EXPRESS below.
The STEP Physical File format is defined in ISO 10303-21: Clear text encoding of the exchange structures. A STEP Physical File is also referred to as a Part 21 file.
The STEP Physical File is an implementation of ISO 10303, and may be used to exchange data between two EDMdatabases or between one EDMdatabase and any ISO 10303-21 conformant application. The STEP Physical File format is suitable for long-term archiving of data.
When the option KEEP_STEP_IDENTIFIERS is enabled, a STEP Identifier model is created and connected to the data model created by this operation. The purpose of the STEP Identifiers model is to preserve the relation between the entity instance identifiers used in the STEP file (stepID) and their corresponding instanceIDs in the EDMdatabase.
No STEP Identifiers model can be created when the ADD_TO_EXISTING_MODEL option is enabled.
The STEP Identifiers model will be opened for read only access when the related edmModel is opened, and the STEP Identifiers model will be deleted when the connecting edmModel is deleted. The STEP Identifiers model can also be handled as an individual model with respect to the EDMdatabase operations.
A STEP Physical File can be created by the edmiRemoteWriteStepFile function.
The edmiRemoteReadStepFile operation is very similar to the edmiImportStepFile operation except that edmiRemoteReadStepFile operation take a few more arguments thereby allowing specification of more details.
For information on the format of the file in argument <shortNamesFile>, see Short names in the EDMsupervisor User Guide.
EXPRESS:
SCHEMA header_section_schema;
TYPE SCHEMA_NAME = STRING (256); END_TYPE;
ENTITY file_description;
description : LIST OF STRING (256);
implementation_level : STRING (256);
END_ENTITY;
ENTITY file_name;
name : STRING (256);
time_stamp : STRING (256);
author : LIST OF STRING (256);
organization : LIST OF STRING (256);
preprocessor_version : STRING (256);
originating_system : STRING (256);
authorisation : STRING (256);
END_ENTITY;
ENTITY file_schema;
schema_identifiers : LIST OF SCHEMA_NAME;
END_ENTITY;
END_SCHEMA;
Related functions: edmiRemoteWriteStepFile.
Prototype:
EdmiError edmiRemoteReadStepFile(SdaiUnsignedInt serverContextId,
SdaiString remoteModelRepositoryName,
SdaiString remoteModelName,
SdaiString remoteHeaderModelRepositoryName,
SdaiString remoteHeaderModelName,
SdaiString stepFile,
SdaiString logFile,
SdaiString remoteSchemaName,
SdaiString shortNamesFile,
SdaiInteger options,
SdaiInteger *nbWarnings,
SdaiInteger *nbErrors,
EdmiError *sdaiError,
SdaiInvocationId *edmiInvocationId);
Arguments:
serverContextId |
Context identification, from edmiDefineServerContext |
remoteModelRepositoryName |
The name of the edmRepository in the remote EDMdatabase that contains or eventually shall contain the edmModel. Repository names are case sensitive. |
remoteModelName |
The name of the edmModel. Model names are case sensitive. If the model exists, the calling EDMuser must have write access to this model. |
remoteHeaderModelRepositoryName |
The name of the edmRepository in the remote EDMdatabase that contains or eventually shall contain the header model. Repository names are case sensitive. |
remoteHeaderModelName |
The name of the header model. Model names are case sensitive. |
stepFile |
The name of the file that contains the STEP Physical File to be read by this operation. The default file extension is .stp |
logFile |
The name of an optional file that will contain diagnostic information resulting from parsing the STEP Physical File. If this argument is NULL, the diagnostics will be written to the _EDMinterface_ current output device. The _EDMinterface_ current output device can be defined by the edmiDefineOutputFunction operation. |
remoteSchemaName |
The name of the Express schema that defines the structure of the data in the Data Section of the actual STEP Physical file is found in the attribute FILE_SCHEMA.SCEMA_IDENTIFIERS in the Header Section of the STEP Physical file. This schema will be used as the underlying schema of the new edmModels resulting from this command. Hence this Express schema must exist as a dictionary model in the _EDMdatabase_ when the edmRemoteReadStepFile function is invoked. |
shortNamesFile |
The name of the file containing the mapping matrix between the full entity names and their corresponding unique short names. For each STEP AP, a short names file is provided by ISO TC184/SC4. |
options |
See list of available options below. |
nbWarnings |
Variable that will receive the number of warnings resulting from parsing the STEP Physical file. |
nbErrors |
Variable that will receive the number of errors resulting from parsing the STEP Physical file. |
sdaiError |
Variable that will receive any _EDMinterface_ error code resulting from the parsing of the data in the STEP Physical file it self. System errors in general will not be returned in this variable. |
edmiInvocationId |
Currently not used. |
Options: Descriptions:
DELETING_EXISTING_MODEL |
If the edmModel that is specified by the argument <remoteModelName> already exists it will be deleted and recreated before the STEP Physical file data is imported. |
NO_STRING_ENCODING |
Specifies that the actual STEP Physical file has no encoding of its string data, hence no decoding will take place during the read operation. |
DELETE_INSTANCES_WITH_REFS |
If an edmModel is implicitly created, this option will disable one of the models built in features, thereby improving its data manipulation performance. |
DELETE_INSTANCE_REFS_ON_DELETE |
If an edmModel is implicitly created, this option will disable one of the models built in features, thereby improving its data manipulation performance. |
NO_INSTANCE_REFERENCES |
If an edmModel is implicitly created, this option will disable one of the models built in features, thereby improving its data manipulation performance.
|
UNPACKED_MODEL |
No garbage collection for the edmModel when data is freed. The disk space used for the edmModel will normally increase. |
USER_CONTROLLED_INVERSE |
If an edmModel is implicitly created, this option will disable one of the models built in features, thereby improving its data manipulation performance. |
KEEP_STEP_IDENTIFIERS |
A STEP Identifier model will be created and connected to the edmModel created by this operation. The STEP Identifier model will preserve the relation between the STEP file entity instances (stepIds) and their corresponding _EDMdatabase_ instanceIds. |
LOG_TO_STDOUT |
Any logged information will be written to the _EDMinterface_ current output device. The _EDMinterface_ current output device can be defined by the edmiDefineOutputFunction operation. |
ADD_TO_EXISTING_MODEL |
The data set in the imported STEP Physical file will be added to the existing population of the edmModel. The data must be based on the same underlying Express Schema as that of the existing edmModel. |
CONFORMANCE_CLASS_1 |
Overrules the mapping method given in the Header Section of the STEP Physical file. The STEP Physical file will be interpreted according to ISO 10303-21:1994/TC1 CC1. |
LOG_TO_FILE |
Any logged information will be stored in the file specified by the <Log file> argument. |
HEADER_MODEL_ONLY |
Only the Header Section of the specified STEP Physical file will be parsed and imported into a STEP Header Model in the _EDMdatabase{_}. No data model will be created when this option is set. |
PARSE_ONLY |
The specified STEP Physical file will be parsed and checked for syntactical correctness only. No data will be stored in the _EDMdatabase{_}. |
CONFORMANCE_CLASS_2 |
Overrules the mapping method given in the Header Section of the STEP Physical file. The STEP Physical file will be interpreted according to ISO 10303-21:1994/TC1 CC2. |
DIS_VERSION |
Overrules the mapping method given in the Header Section of the STEP Physical file. The STEP Physical file will be interpreted according to ISO 10303-21:1994/TC1 DIS. |
LOG_ERRORS_AND_WARNINGS_ONLY |
Log messages will only be generated for the instances that cause errors or warnings. |
UTF8_ENCODED_FILE_NAMES |
Use UTF-8 for file names |
UTF_8_STRING_ENCODING |
Use UTF-8 for the model |
ISO_8859_1_STRING_ENCODING |
Use ISO_8859_1 for model encoding |
ONE_FILE_STEP_FILE_PACKAGE |
Must be used with STEP_FILE_PACKAGE . Will read one STEP file that contains the model and all the associated data files. |
STEP_FILE_PACKAGE |
Will allow the STEP file to have EDM types FILE and BLOG. Each data file within the model will be available as a separate file. |
ONLY_USER_DEFINED_ENTITIES |
only instances of USER_DEFINED_ENTITY will be populated in the "read step file" operation |
OPEN_MODEL_FOR_LOCAL_READ_WRITE |
Opens the new model for read and write operations |
EXCLUDE_USER_DEFINED_ENTITIES |
instances of USER_DEFINED_ENTITY on the STEP file will not be populated in the "read step file" operation |
ZIPPED_FILE |
Will read a model that is compresses in the .gz format |
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:
EdmiError rstat, error;
SdaiInteger nWrn, nErr;
SdaiServerContext myContext;
/* Create Server Context */
rstat = edmiDefineServerContext("MyContext",
"Johnny", "Supervisor", "cf37ftr",
"TCP", "9090", "MyServerHost",
NULL, NULL, NULL, NULL, NULL, &myContext);
/* Read the population into the remote database */
rstat = edmiRemoteReadStepFile(myContext,
"OurRemoteRepository", "OurRemoteModel",
NULL, NULL, "c:/data/population.stp",
"c:/temp/population.dia",
"OurExpressSchema", NULL,
DELETING_EXISTING_MODEL | LOG_TO_FILE,
&nWrn, &nErr, &error, NULL);
. . .
/* Modify the population remotely */
. . .
/* Write the modified population
back on a step physical file */
rstat = edmiRemoteWriteStepFile(myContext,
"OurRemoteRepository", "OurRemoteModel",
NULL, NULL, "c:/data/new_population.stp",
"c:/temp/new_population.dia", NULL,
KEEP_STEP_IDENTIFIERS, 6,
&nWrn, &nErr, &error, NULL);
. . .