edmiWriteStepFile2Ex


 

EdmiError edmiWriteStepFile2Ex(SdaiString     repositoryName,
                                SdaiString     modelName,
                                SdaiString     headerModelRepositoryName,
                                SdaiString     headerModelName,
                                SdaiString     stepFile,
                                SdaiString     diaFileName,
                                SdaiString     shortNamesFile,
                                SdaiInteger    options,
                                SdaiInteger    realPrecision,
                                SdaiInteger    stringEncodingCode,
                                SdaiInteger    *nbWarnings,
                                SdaiInteger    *nbErrors,
                                SdaiErrorCode  *sdaiError)

Invokes the EDMp21Handler to produce a STEP Physical File representation of a data model in the EDMdatabase. 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 an EDMdatabase and any application that conforms to ISO 10303-21. The produced file can also be used for long time archiving of the data. The Header Section part of the STEP 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.
 

Arguments


1TypeNameComment
2SdaiString

RepositoryName

The name of the data repository that contains the model to make a XML representation of. Repository names are case sensitive.

3SdaiString

ModelName

The name of the data model from which data is to be exported to the specified XML File. Model names are case sensitive.

4 

headerModelRepositoryName

The name of the data repository that contains the STEP Header Model of the edmModel for which to create an ISO10303-P21 STEP file representation.

5SdaiString

HeaderModelName

The name of the STEP Header Model inEDMdatabase that will be mapped to the Header Section in the resulting STEP file. STEP Header Model names are case sensitive. The specified STEP Header Model must be located in the repository specified by the <repositoryName> argument.
All instances in the specified <headerModelName> will be mapped to the STEP file Header Section as is, except that the attributeFILE_DESCRIPTION.IMPLEMENTATION_LEVEL is set according to the mapping method specified by one of the options; CONFORMANCE_CLASS_1,CONFORMANCE_CLASS_2 orEDM_PRIVATE_FORMAT. The attributeFILE_NAME.TIME_STAMP is set to the current date and time, i.e., the date and time when the STEP file is generated.
When the NO_HEADER_CHANGE option is set, the specified header model will be mapped as is, i.e., also the three attribute values described above will be mapped from the specified header model to the STEP file.
When the <headerModelName> argument is blank, a default Header Section will be generated. This default header section can be configured by setting the EDM system variable EDM_STEP_FILE_AUTHOR.

6SdaiString

stepFile

The name of the generated ISO-10303-P21 STEP file. The default file extension is ".stp".

7SdaiString

XmlFileName

The name of the XML file to be generated.

8SdaiString

diaFileName

The name of the file that will receive diagnostic information from the generation of the STEP Physical File.
If this argument is empty ( = NULL) the diagnostics will be written to the EDMinterface current output device. Use edmiDefineOutputFunction to set theEDMinterface current output device.

9SdaiString

shortNamesFile

The name of the file containing mappings between full entity names and their corresponding unique short names. For each STEP AP, a short names file is provided by ISO TC184/SC4 and can be downloaded from

http://www.steptools.com/short_names/index.html

.

10SdaiInteger

options

Specifies the string encoding used in the STEP file. Legal string encoding codes are:
CHAR_ENCODING_UTF_8, CHAR_ENCODING_ISO_8859_1, CHAR_ENCODING_ISO_8859_2, CHAR_ENCODING_ISO_8859_3, CHAR_ENCODING_ISO_8859_4, CHAR_ENCODING_ISO_8859_5, CHAR_ENCODING_ISO_8859_6, CHAR_ENCODING_ISO_8859_7, CHAR_ENCODING_ISO_8859_8, CHAR_ENCODING_ISO_8859_9.
The UTF_8 character encoding is using the \X2\ and \X4\ string encoding directive. All the ISO_8859_ character encoding codes are using the \PA\ , \PB\  … to \PI\ string encoding directive.
The <stringEncodingCode> must be the same as the string encoding in the actual model to be mapped to the STEP file, except conversion between UTF-8 and any of the ISO_8859_ codes and vice versa.

11SdaiInteger

nbWarnings

Variable that will receive the number of warnings resulting from exporting the step file.

12SdaiInteger

NbErrors

Address of a variable that will receive the number of errors encountered when the model was exported.

13SdaiErrorCode

sdaiError

Address of a variable that will receive the EDMinterface error code when the edmiWriteStepFile function receives an error code in the communication with the EDMserver. The function edmiGetErrorText can be used to get the error message that corresponds to the EDMinterface error code.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

Options


 

OptionComment

CONFORMANCE_CLASS_1

Enforce the file to be exported according to ISO 10303-21:1994/TC1 conformance class 1 format. Identification of the format is written to the Header Section of the resulting STEP file.
The options CONFORMANCE_CLASS_1, CONFORMANCE_CLASS_2 and EDM_PRIVATE_FORMAT are mutually exclusive, i.e., only one of these options should be activated in one execution of the edmiWriteStepFile function.
CONFORMANCE_CLASS_1 is the default mapping method to use in the operation.

CONFORMANCE_CLASS_2

Enforce the file to be exported according to ISO 10303-21:1994/TC1 conformance class 2 format. Identification of the format is written to the Header Section of the resulting STEP file.
The options CONFORMANCE_CLASS_1, CONFORMANCE_CLASS_2 and EDM_PRIVATE_FORMAT are mutually exclusive, i.e., only one of these options should be activated in one execution of the edmiWriteStepFile function.

EDM_PRIVATE_FORMAT

Exports an EXPRESS Data Manager private format for more compressed exchange between two or more EDMdatabase. Identification of the format is written to the Header Section of the resulting STEP file.
Note: This is an EPM proprietary format, hence this format can only be used to exchange STEP files between EXPRESS Data Manager systems.
The options CONFORMANCE_CLASS_1, CONFORMANCE_CLASS_2 and EDM_PRIVATE_FORMAT are mutually exclusive, i.e., only one of these options should be activated in one execution of the edmiWriteStepFile function.

SHORT_NAMES

Specifies that the short names specified in the <shortNamesFile> argument will be used for entity names in the resulting STEP file.

EDM_IDENTIFIERS

Specifies that the EDMdatabase instanceID will be used as instance identifiers in the STEP Physical File such that it will be easy to find the correspondence between a mapped instance on the STEP file and the same instance in the EDMdatabase.

NO_HEADER_CHANGE

Specifies that the header model specified by the <headerModelName> argument will be mapped to the actual STEP file without any changes. Normally the mapping method, time stamp, and schema name will be provided by the EDMstepHandler function, but no information will be provided by the EDMstepHandler when this option is set. This argument is only effective when a header model is specified in the <headerModelName> argument.

NO_STRING_ENCODING

Specifies that no encoding will take place when mapping a STRING data type to the STEP file. The ISO 10303-21 specifies that all character in a STRING data type that have an ASCII value less than 32 or greater than 126 should be encoded in a STEP file.

NO_LINE_BREAKS

 

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.

COMPRESSED_FILE

 

HEADER_MODEL_ONLY

Specifies that only the Header Section of the specified STEP file will be parsed and a STEP Header Model will be created and populated in the EDMdatabase. No data model will be created when this option is set.

Example


 

 EdmiError rstat, err;
 SdaiInteger nWrn, nErr;
 SdaiModel modId;
  
 /* Import the ISO10303-21 file,
    with greek letters using the \PG\ string encoding directive */
 if (rstat = edmiReadStepFileEx ("DataRepository", "MyModel", NULL, NULL,
 "c:/data/myGreekP21file.stp", "c:/temp/myGreekP21file.dia",
 NULL, NULL, DELETING_EXISTING_MODEL|CONFORMANCE_CLASS_2,
 &modId, &nWrn, &nErr, &err)) {
 printf("\nError %d in edmiReadStepFileEx: %s", rstat,  
 edmiGetErrorText(rstat));
 goto error;
 }
 . . .
 /* Modify population here */
 . . .
 /* Export the ISO10303-21 file */
 if (rstat = edmiWriteStepFile2Ex("DataRepository", "myModel", NULL, NULL,
 "c:/data/myP21file.stp", "c:/temp/myP21file.dia",
 NULL, CONFORMANCE_CLASS_2, 8, CHAR_ENCODING_ISO_8859_7, &nWrn, &nErr, &err)) {
 printf("\nError %d in edmiWriteStepFileEx: %s", rstat,  
 edmiGetErrorText(rstat));
 goto error;
 }
 . . .
 error:. . .

 

See also

Filter by label

There are no items with the selected labels at this time.