edmiWriteXMLFileEx

EdmiError edmiWriteXMLFileEx(SdaiString       repositoryName,
                               SdaiString       modelName, 
                               SdaiSelect       pSel,
                               SdaiString       headerRepositoryName, 
                               SdaiString       headerModelName, 
                               SdaiString       xmlConfigurationName, 
                               SdaiString       xmlFileName, 
                               SdaiString       diagnosticFileName, 
                               SdaiString       encodingEdm, 
                               SdaiString       encodingXml, 
                               SdaiUnsignedInt  options, 
                               SdaiInteger      *nbWarnings, 
                               SdaiInteger      *nbErrors, 
                               SdaiErrorCode    *sdaiError); 

Export an edmModel or parts of an edmModel to an Xml-formatted file on the file system. This function has an insufficient parameter list. Use the improved edmiWriteXMLFileEx instead. edmiWriteXMLFile has been kept for compatibility reasons.

Arguments


TypeNameComment
SdaiString

repositoryName

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

SdaiString

modelName

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

SdaiSelect

Psel

Edm select type specifying the starting point for exporting XML date from. If this parameter is set to NULL the entire model will be exported.
The most common starting points are instances and aggregates. All references will be exported to the XML file

SdaiString

headerRepositoryName

The name of the data repository that contains the XML header model. Repository names are case sensitive.
If this parameter is NULL or an empty string, <headerRepositoryName> will be set equal to <repositoryName>

SdaiString

headerModelName

Specifies the name of the XML Header Model that will be exported to the Header Section in the resulting XML file. XML Header Model names are case sensitive. The specified XML Header Model must be located in the repository specified by the parameter <headerRepositoryName>.

SdaiString

xmlConfigurationName

The name of the XML configuration. NULL means no configuration.

SdaiString

xmlFileName

The name of the XML file to be generated.

SdaiString

diagnosticFileName

Specifies the file name for diagnostic information generated by this function. If no file name is supplied, i.e. the <diagnosticFileName> argument is set to NULL or an empty string, all diagnostic information will be written to the EDMinterface current output device.
Use edmiDefineOutputFunction to redefine the EDMinterface current output device.

SdaiStringencodingEdm

The encoding of data in EDM (source). Default is UTF8. Legal values are;

  • "UTF-8"
  • "UTF-16"
  • "ISO-10646-UCS-2"
  • "ISO-10646-UCS-4"
  • "ISO-LATIN-1"
  • "ISO-LATIN-2"
  • "ISO-8859-3"
  • "ISO-8859-4"
  • "ISO-8859-5"
  • "ISO-8859-6"
  • "ISO-8859-7"
  • "ISO-8859-8"
  • "ISO-8859-9"
  • "ISO-2022-jp"
  • "SHIFT_JIS"
  • "EUC-JP"
SdaiStringencodingXmlThe encoding of data in XML (target). Default is UTF8. Legal values are the same as for encodingEDM.
SdaiUnsignedInt

Options

A bitwise OR between the options described below. All option names are defined in the header file sdai.h.

SdaiInteger

NbWarnings

Address of a variable that will receive the number of warnings generated by EDM when the model was exported.

SdaiInteger

NbErrors

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

SdaiErrorCode

SdaiError

Address of a variable that will receive any EDMinterface error code returned from the EDMserver. Use edmiGetErrorText to convert the error code into a readable message

Return Value


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

Options


 

OptionComment

INCLUDE_HEADER

Include header element when writing ISO_10303_28 document

INCLUDE_CONFIGURATION

Include configuration element when writing ISO_10303_28 document

INCLUDE_SCHEMA

Include schema elements when writing ISO_10303_28 document

EXTRACT_SHALLOW

Use this option to prevent referenced instances to be exported. By default EDM will export all the instances given in <psel> and the entire mesh of referenced instances that spreads out from them.

EDM_IDENTIFIERS

Use the full internal instanceIds of EDM as step Ids in the exported XML file. By default, the step Ids are the local references from within each model.

Example


 

 EdmiError rstat;
 SdaiInteger nWarnings;
 SdaiInteger nErrors;
 . . .
 if (rstat = edmiWriteXMLFileEx ("myXmlRepository", "myXmlModel",
 NULL, "myXmlHeaderModel",
 "myXmlConfiguration",
 "c:/Johnny/myXmlFile.xml",
 "c:/Johnny/tmp/myXmlFile.diag",
 "UTF-8", "ISO-LATIN-1",
 INCLUDE_HEADER | INCLUDE_CONFIGURATION,
 &nWarnings, &nErrors, &rstat)) {
 printf("\nError %d in edmiWriteXMLFileEx: %s", rstat,
 edmiGetErrorText(rstat)); 
 goto Error; 
 }

 

See also

Filter by label

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