User:Jcreer/SNS:DMI Exporting/Importing Elements

From XMS Wiki
Jump to navigationJump to search
Element <export_format>
Info Placed inside the <card> to determine how the card format will be displayed when exporting to a text file. Uses the standard printf and sprintf format (www.cplusplus.com/reference/clibrary/cstdio/printf/). “#card_name” should be used when displaying the card. When using an element that starts with “custom_control”, a user can use the # character to get to the value or units.
Versions 1, 2
Attributes ignore_on_read
Children none
Used by card
Example 1
<edit_box>
  <unique_name>MyEditBox</unique_name>
</edit_box>
…
<card>
   <card_name>FIFTH_GRAIN</card_name>
   <export_format>”%s %lf\n", #card_name, MyEditBox</export_format>
</card>
Example 2

If the edit_box has the value of 15, this would print out: FIFTH_GRAIN 15

Example 3

If export_format was changed to this: <export_format>”%s \”%lf\” // comment\n", #card_name, MyEditBox </export_format>

FIFTH_GRAIN “15” // comment

Example 4
<control_length>
  <unique_name>MyLength</unique_name>
  ...
</control_length>
…
<card>
   <card_name>ADAPTATION_LENGTH_TOTAL</card_name>
   <export_format>”%s %lf, %s\n", #card_name, MyLength#value,
                              MyLength#units</export_format>
</card> 

ADAPTATION_LENGTH_TOTAL 25 cm
Element <export_group>
Info A way of grouping optional exports.
Versions 2
Attributes ignore_on_read
Children Any element beginning with “process_” and required.
Used by Any element beginning with “process_”.
Example