User:Jcreer/SNS:DMI Exporting/Importing Elements: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
Line 108: Line 108:
  <export_location>”\\%s__%s.cmcards”, #PROJECT_NAME,  
  <export_location>”\\%s__%s.cmcards”, #PROJECT_NAME,  
     #GEOMETRY</export_location>
     #GEOMETRY</export_location>
|}
=====Element ''<export_optional>''=====
{|class="wikitable"
|-
|width="70"|'''Info'''
|width="530"| Indicator of text that might be included. If it has default as a child, then SMS will write out the text included in this element.
|-
|'''Versions'''
| 2
|-
|'''Attributes'''
|ignore_on_read
|-
|'''Children'''
|width="530"| Any element beginning with “process_”, [[SMS:Dynamic Model Interface Schema#Element <export_format>|export_format]], [[SMS:Dynamic Model Interface Schema#Element <default>|default]], [[SMS:Dynamic Model Interface Schema#Element <separator>|separator]].
|-
|'''Used by'''
| width="530"| Any element beginning with “process_”.
|-
|'''Example'''
|width="530"|
|}
|}

Revision as of 22:08, 3 March 2015

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
Element <export_location>
Info Relative or absolute path of the export file (CMCARDS). Can be used multiple times if exporting to more than 1 file location. Keywords can be #PROJECT_NAME and #GEOMETRY.
Versions 1, 2
Attributes none
Children none
Used by group, card, input_file, output_file. If it used just within group or link_to (version 1), then everything within the element will use the same export location unless specified in the child group or item card.
Example 1
<export_location>\\Ideal__Inlet.cmcards</export_location>
Example 2
<export_location>\\#PROJECT_NAME_#GEOMETRY.cmcards</export_location>

<export_location>”\\%s__%s.cmcards”, #PROJECT_NAME, 
   #GEOMETRY</export_location>
Element <export_optional>
Info Indicator of text that might be included. If it has default as a child, then SMS will write out the text included in this element.
Versions 2
Attributes ignore_on_read
Children Any element beginning with “process_”, export_format, default, separator.
Used by Any element beginning with “process_”.
Example