User:Jcreer/SNS:DMI Exporting/Importing Elements: Difference between revisions
From XMS Wiki
Jump to navigationJump to search
Line 78: | Line 78: | ||
|'''Example''' | |'''Example''' | ||
|width="530"| | |width="530"| | ||
|} | |||
=====Element ''<export_location>''===== | |||
{|class="wikitable" | |||
|- | |||
|width="70"|'''Info''' | |||
|width="530"| 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''' | |||
|width="530"| none | |||
|- | |||
|'''Used by''' | |||
| width="530"| [[SMS:Dynamic Model Interface Schema#Element <group>|group]], [[SMS:Dynamic Model Interface Schema#Element <card>|card]], [[SMS:Dynamic Model Interface Schema#Element <input_file>|input_file]], [[SMS:Dynamic Model Interface Schema#Element <output_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''' | |||
|width="530"| | |||
<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> | |||
|} | |} |
Revision as of 22:07, 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> |