XML Syntax
Model Object - XML syntax
The REXS model is contained in an XML tag called "model," which includes the "relations" and "components" tags as well as the "load_spectrum" tag, if applicable.
Example model REXS file | XML syntax
<model version="1.4" applicationId="FVA-Workbench" applicationVersion="7.0.0" date="2021-11-03T11:35:17+01:00" applicationLanguage="en"> <relations>...</relations> <components>...</components> <load_spectrum>...</load_spectrum> (optional) </model>
Components - XML Syntax
Components are described in the interface file with the <component></component> XML tag.
The contents of the tag are the attributes associated with the component.
Example components | XML syntax
<components> <component id="4" type="cylindrical_gear" name="Pinion"> <attribute id="attr1"> .. </attribute> <attribute id="attr2"> .. </attribute> ... </component > <component id="6" type="cylindrical_gear" name="Wheel"> <attribute id="attr1"> .. </attribute> <attribute id="attr2"> .. </attribute> ... </component > </components>
Attribute values - XML syntax
Feature | Description | |
---|---|---|
Scalar attribute values | The value of the attribute is specified in the "attribute" tag; e.g., <attribute …>4.72</attribute>. | |
The floating-point symbol is "." (period). | ||
Array values | array | The "array" tag encloses the columns of a one-dimensional array. |
c | The "c" (column) tag indicates a column of the array, and encloses a scalar entry of the array (see example below) | |
The floating-point symbol is "." (period). | ||
code | NoticeChange from REXS version 1.3 Specification of arrays in binary format is new. If arrays exceed a certain size, it may be helpful to store them in binary format in the REXS file for performance reasons. The "code" xml attribute is an optional specification in the array tag. This should be used if the array is in binary format with base64 encoding in the REXS file. To do so, the encoding and the binary format are specified in the "array" xml tag. The byte order is "Little Endian." The following variants are available:
If the array is entered in binary format, the "c" tags are omitted. | |
Matrix values | matrix | The "matrix" tag encloses the rows of a matrix. |
r | The "r" tag (row) identifies a row of the matrix, and encloses a list of "c" entries. The contents of all rows must be the same length. | |
c | The "c" tag (column) identifies a column of the matrix, and encloses a scalar entry of the matrix (see example below). | |
The floating-point symbol is "." (period). | ||
code, rows, columns | NoticeChange from REXS version 1.3 Specifation of matrices in binary format is new. If matrices exceed a certain size, it may be helpful to store them in binary format in the REXS file for performance reasons. The "code" xml attribute is an optional specification in the matrix tag. This should be used if the matrix is in binary format with base64 encoding in the REXS file. First, the 2d matrix is converted column-by-column into a 1d array (array = [column1, column2, ...]). This is then converted into binary format, as described above (the byte order is "Little Endian“) and finally converted into a string using base64 encoding. In addition to the binary format (int32, float64, float32), the number of rows and columns of the matrix must be specified via "rows" and "columns" in the matrix tag. The following variants are available:
If the matrix is entered in binary format, the "r" and "c" tags are omitted. | |
NoticeChange from REXS version 1.3 Various attribute extensions and modifications. These are documented in the REXS database. Array-of-array values | array_of_arrays | The "array_of_arrays" tag encloses the rows of an array-of-arrays. |
array | The "array" tag identifies a row of the array-of-arrays, and encloses a list of "c" entries. The rows may be different lengths. | |
c | The "c" tag (column) identifies a column of an array, and encloses a scalar entry of the array-of-arrays (see example below). |
Example attribute - XML syntax
Example string attribute | XML syntax
<attribute id="name">30203-A</attribute>
Example double-attribute with unit | XML syntax
<attribute id="normal_module" unit="mm">23.5</attribute>
Example double-attribute without unit | XML syntax
<attribute id="addendum_modification_coefficient" unit="none">23.5</attribute>
Example integer attribute without unit | XML syntax
<attribute id="number_of_teeth" unit="none">8</attribute>
Example boolean attribute | XML syntax
<attribute id="is_driving_gear">false</attribute>
Example enum attribute | XML syntax
<attribute id="axial_force_absorption">both_directions</attribute>
Example array attribute | XML syntax
<attribute id="support_vector" unit="mm"> <array> <c>1.0</c> <c>1.0</c> <c>0.0</c> </array> </attribute>
Example matrix attribute | XML syntax
<attribute id="matrix_correction" unit="mm"> <matrix> <r> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> </r> <r> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> </r> ... <r> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> <c>0.0</c> </r> </matrix> </attribute>
Example array attribute in binary format | XML syntax
<attribute id="example_attribute_id" unit="mm"> <array code="float64"/>62wRNhgQS0AAAAAAAAAAANgPsyG1MXDA=<array/> </attribute>
Example matrix attribute in binary format | XML syntax
<attribute id="example_matrix_coded" unit="mm"> <matrix code="float64" columns="3" rows="2">AAAAAAAA8D8AAAAAAAAQQAAAAAAAAABAAAAAAAAAFEAAAAAAAAAIQAAAAAAAABhA</matrix> </attribute>
Example array_of_integer_arrays attribute | XML syntax
<attribute id="element_structure" unit="none"> <array_of_arrays> <array><c>108</c><c>2</c><c>1</c><c>107</c></array> <array><c>109</c><c>3</c><c>2</c><c>108</c></array> <array><c>8</c><c>114</c><c>115</c></array> </array_of_arrays> </attribute>
Relations - XML syntax
A relation in the XML file consists of a "relation" tag, which contains multiple "ref" tags.
Example REXS file relations | XML syntax
<relations> <relation id="15" type="ordered_assembly" order="1"> <ref id="8" role="assembly" hint="bearing"/> <ref id="16" role="part" hint="bearing_row"/> </relation> <relation id="23" type="stage"> <ref id="3" role="stage" hint="cylindrical_stage"/> <ref id="7" role="gear_1" hint="cylindrical_gear"/> <ref id="9" role="gear_2" hint="cylindrical_gear"/> </relation> </relations>
"load_spectrum" object - XML syntax
The "load_spectrum" tag is an optional part of a REXS XML model. It has a (numeric) identifier ("id") and encloses one or more "load_case" tags and the "accumulation" tag. These in turn enclose a list of "component" tags.
Example load spectrum | XML syntax
<model> <relations> <components> <component id="1"> <component id="4"> <component id="6"> <!-- further components --> </components> <load_spectrum id="1"> <load_case id="1"> <load_case id="2"> <load_case id="3"> <component id="4"> <component id="6"> </load_case> <accumulation> <component id="4"> <component id="6"> </accumulation> </load_spectrum> </model>
Example model - XML syntax
Example model | XML syntax
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <model applicationId="FVA Workbench" applicationVersion="7.0" date="2021-11-23T13:52:44+01:00" version="1.4"> <relations> <relation id="45" type="assembly"> <ref hint="shaft" id="42" role="assembly"/> <ref hint="shaft_section" id="78" role="part"/> </relation> <relation id="53" type="side"> <ref hint="shaft" id="6" role="inner_part"/> <ref hint="shaft" id="42" role="outer_part"/> <ref hint="rolling_bearing_with_detailed_geometry" id="86" role="assembly"/> </relation> ... </relations> <components> <component id="44" name="Cylindrical gear [44]" type="cylindrical_gear"> <attribute id="example_string" unit="none">30203-A</attribute> <attribute id="example_floating_point_unit" unit="mum">20.0</attribute> <attribute id="example_floating_point_without_unit" unit="none">0.3</attribute> <attribute id="example_integer" unit="none">3</attribute> <attribute id="example_enum" unit="none">method_b</attribute> <attribute id="example_boolean" unit="none">false</attribute> <attribute id="example_floating_point_array" unit="mm"> <array><c>155.0</c><c>0.0</c><c>-190.0</c></array> </attribute> <attribute id="example_floating_point_matrix" unit="mm"> <matrix> <r><c>1.0</c><c>0.0</c><c>0.0</c></r> <r><c>0.0</c><c>1.0</c><c>0.0</c></r> <r><c>0.0</c><c>0.0</c><c>1.0</c></r> </matrix> </attribute> <attribute id="example_floating_point_array_coded" unit="mm"> <array code="float64">62wRNhgQS0AAAAAAAAAAANgPsyG1MXDA</array> </attribute> <attribute id="example_array_of_arrays" unit="none"> <array_of_arrays> <array><c>108</c><c>2</c><c>1</c><c>107</c></array> <array><c>109</c><c>3</c><c>2</c><c>108</c></array> <array><c>8</c><c>114</c><c>115</c></array> </array_of_arrays> </attribute> </component> <component id="45" name="Cylindrical gear [45]" type="cylindrical_gear"> ... </component> </components> <load_spectrum id="1"> <load_case id="1"> <load_case id="2"> <load_case id="3"> <component id="4"> <attribute id="example" unit="mm">20.0</attribute> ... </component> </load_case> <accumulation> <component id="4">...</component> </accumulation> </load_spectrum> </model>