Invokes the EDMp21Handler to produce a STEP Physical File representation of the population of an edmModel in the remote EDMdatabase specified by the given server context.
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.
STEP Physical File is one of the implementation forms of ISO 10303, and can be used to exchange data between two EDMdatabase s or between one EDMdatabase and any ISO 10303-21 conformant application. The STEP Physical File can also be used for long-term archiving of the data.
The Header Section part of the STEP Physical file can be produced from an existing header model in the EDMdatabase or a default Header Section can be produced when no header model is specified as input argument to this function. A header model is a model of the HEADER_SECTION_SCHEMA defined in ISO 10303-21. The default Header Section can be configured by setting the EDM system variable EDM_STEP_FILE_AUTHOR.
For information on the format of the file in argument <shortNamesFile>, see Short names in the EDMsupervisor User Guide.
Related functions: edmiRemoteReadStepFile.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteWriteStepFile(SdaiUnsignedInt serverContextId,
SdaiString remoteModelRepositoryName,
SdaiString remoteModelName,
SdaiString remoteHeaderModelRepositoryName,
SdaiString remoteHeaderModelName,
SdaiString stepFile,
SdaiString diaFileName,
SdaiString shortNamesFile,
SdaiInteger options,
SdaiInteger realPrecision,
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 the edmModel. Repository names are case sensitive. |
remoteModelName |
The name of the edmModel. Model names are case sensitive. |
remoteHeaderModelRepositoryName |
The name of the edmRepository in the remote EDMdatabase that contains the STEP Header Model. Repository names are case sensitive. |
remoteHeaderModelName |
The name of the STEP Header Model that will be mapped to the Header Section in the resulting STEP Physical file. Model names are case sensitive. |
stepFile |
The name of the STEP Physical File to create on the local disk. The default file extension is .stp |
diaFileName |
The name of an optional file that will receive the diagnostic information resulting from the generating of 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. |
shortNamesFile |
The name of the file containing the mapping matrix between the full entity names and their corresponding unique short names. |
options |
See list of available options below. |
realPrecision |
Denotes the number of significant digits after the decimal point for REAL numbers in the resulting STEP Physical file. When <realPrecision> is set to zero, a system dependent default value is used. |
nbWarnings |
Variable that will receive the number of warnings resulting from exporting the STEP Physical file. |
nbErrors |
Variable that will receive the number of errors resulting from exporting the STEP Physical file. |
sdaiError |
Variable that will receive any _EDMinterface_ error code resulting from exporting the data in the STEP Physical file it self. System errors in general wil not be returned in this variable. |
edmiInvocationId |
Currently not used. |
Options: Descriptions:
NO_STRING_ENCODING |
Specifies that no encoding will take place when mapping a STRING data type to the STEP Physical file. The ISO 10303-21 specifies that all characters in a string with an ASCII value less than 32 or greater than 126 should be encoded in a STEP Physical file. |
NO_LINE_BREAKS |
The exported instances will not be separated with new-line characters in the STEP Physical file. |
NO_HEADER_CHANGE |
The header model specified by the <headerModelName> argument will be mapped to the actual STEP Physical file without any changes. Normally the mapping method, time stamp, and schema name will be provided by the EDMstepHandler function, but not when this option is set. This argument is only effective when a header model is specified in the <headerModelName> argument. |
SHORT_NAMES |
The short names specified in the <shortNamesFile> argument will be used for entity names in the resulting STEP Physical file. |
KEPT_STEP_IDENTIFIERS |
The instanceIds of the edmModel population will be mapped to the corresponding stepIDs in the STEP Identifier model before they are exported to a STEP file. |
EDM_IDENTIFIERS |
Specifies that the _EDMdatabase_ instanceID will be used as instance identifiers in the STEP Physical File. This makes it easier to find the correlation between a stepIds in the STEP Physical file and their corresponding instanceIds in the _EDMdatabase{_}. |
ZIPPED_FILE |
The resulting exported STEP Physical file will be in a compressed file format. |
CONFORMANCE_CLASS_1 |
The STEP Physical file will be exported according to ISO 10303-21:1994/TC1 CC1. The mapping format will be written to the header section of the STEP file. CONFORMANCE_CLASS_1 is the default mapping method. |
UTF8_ENCODED_FILE_NAMES |
Use UTF-8 encoding for file names |
ONE_FILE_STEP_FILE_PACKAGE |
Must be used with STEP_FILE_PACKAGE . Will create 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 created as a separate file. |
NUMBER_OF_SUBTYPE_INSTANCES_STATISTICS |
write the "number of subtype instances statistics" as comment on the STEP file. |
NO_COMMENT_SECTION |
The created STEP file will no have the Header comment section. The header comment section includes information on: |
ONLY_USER_DEFINED_ENTITIES |
only instances of type USER_DEFINED_ENTITY will be written to the STEP file |
USE_MODEL_STRING_ENCODING |
use the same string encoding (Code Page) on the sTEP file as in the actual EDMmodel |
EXCLUDE_USER_DEFINED_ENTITIES |
no instances of type USER_DEFINED_ENTITY will be written to the STEP file |
NUMBER_OF_INSTANCES_STATISTICS |
write the "number of instances statistics" as comment on the STEP file. |
HEADER_MODEL_ONLY |
Only create header model |
CONFORMANCE_CLASS_2 |
Enforce the file to be exported according to ISO 10303-21:1994/TC1 conformance class 2 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);
. . .