User:Jcreer/SNS:DMI Exporting/Importing Elements: Difference between revisions
From XMS Wiki
Jump to navigationJump to search
No edit summary |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOINDEX__ | |||
{{TOCright}} | {{TOCright}} | ||
==Elements== | |||
=====Element ''<export_format>''===== | =====Element ''<export_format>''===== | ||
{|class="wikitable" | {|class="wikitable" | ||
Line 328: | Line 329: | ||
|width="530"| | |width="530"| | ||
|} | |} | ||
=====Element ''<process_on_count>''===== | |||
{|class="wikitable" | |||
|- | |||
|width="70"|'''Info''' | |||
|width="530"| Indicator to perform a certain action only on certain iterations of a loop. | |||
|- | |||
|'''Versions''' | |||
| 2 | |||
|- | |||
|'''Attributes''' | |||
|ignore_on_read | |||
|- | |||
|'''Children''' | |||
|width="530"| process_column, [[SMS:Dynamic Model Interface Schema#Element <card>|card]], [[SMS:Dynamic Model Interface Schema#Element <process_each_coverage>|process_each_coverage]], [[SMS:Dynamic Model Interface Schema#Element <process_each_polygon>|process_each_polygon]], [[SMS:Dynamic Model Interface Schema#Element <process_each_arc>|process_each_arc]], [[SMS:Dynamic Model Interface Schema#Element <process_each_point>|process_each_point]], [[SMS:Dynamic Model Interface Schema#Element <card_name>|card_name]], [[SMS:Dynamic Model Interface Schema#Element <export_format>|export_format]], [[SMS:Dynamic Model Interface Schema#Element <separator>|separator]] | |||
|- | |||
|'''Used by''' | |||
| width="530"| process_column, [[SMS:Dynamic Model Interface Schema#Element <card>|card]], [[SMS:Dynamic Model Interface Schema#Element <process_each_coverage>|process_each_coverage]], [[SMS:Dynamic Model Interface Schema#Element <process_each_polygon>|process_each_polygon]], [[SMS:Dynamic Model Interface Schema#Element <process_each_arc>|process_each_arc]], [[SMS:Dynamic Model Interface Schema#Element <process_each_point>|process_each_point]] | |||
|- | |||
|'''Example ''' | |||
|width="530"| | |||
|} | |||
=====Element ''<separator>''===== | |||
{|class="wikitable" | |||
|- | |||
|width="70"|'''Info''' | |||
|width="530"| Determines how to separate text that is being exported into a text file. | |||
|- | |||
|'''Versions''' | |||
| 1, 2 | |||
|- | |||
|'''Attributes''' | |||
|none | |||
|- | |||
|'''Children''' | |||
|width="530"| none | |||
|- | |||
|'''Used by''' | |||
| width="530"| export_each_row | |||
|- | |||
|'''Example ''' | |||
|width="530"|See <export_table> | |||
|} | |||
==Attributes== | |||
=====Attribute @ ''<ignore_on_read>''===== | |||
{|class="wikitable" | |||
|- | |||
|width="70"|'''Info''' | |||
|width="530"|Ignore when reading | |||
|- | |||
|'''Values''' | |||
|none | |||
|- | |||
|'''Version''' | |||
|2 | |||
|- | |||
|'''Used by''' | |||
|width="530"|export_format, export_group, export_optional, process_each_arc, process_each_coverage, process_each_material, process_each_point, process_each_polygon, process_each_row, process_on_condition, process_on_count, section | |||
|} | |||
=====Attribute @ ''<widget>''===== | |||
{|class="wikitable" | |||
|- | |||
|width="70"|'''Info''' | |||
|width="530"|Name of widget. In the case of xmdf_dataset it is the control_dataset. Process_each_row it is a column in a table | |||
|- | |||
|'''Values''' | |||
|string | |||
|- | |||
|'''Version''' | |||
|3 | |||
|- | |||
|'''Used by''' | |||
|width="530"|xmdf_dataset, process_each_row | |||
|} | |||
[[Category:Jcreer|DMI]] |
Latest revision as of 16:13, 4 March 2019
Elements
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 |
Element <export_text>
Info | Used to write out a different name to the export file than the “text” displayed to the user. |
Versions | 1, 2 |
Attributes | none |
Children | none |
Used by | option |
Example | We have a combo box and one of the options is Equilibrium which is selected. If the file is exported and the <export_text> card is omitted we would write out:
FORMULATION Equilibrium However, if we wanted to write out EQ instead, we would use the <export_text> tag. The exported line would look like: FORMULATION EQ <combo_box> <unique_name>formulationUnits</unique_name> <option> <text>Equilibrium</text> <export_text>EQ</export_text> </option> … <card> <card_name>FORMULATION</card_name> <export_format>"%s %s\n, #card_name, formulationUnits </card> </combo_box> |
Element <process_each_arc>
Info | Indicator to loop through each arc in the given context. |
Versions | 2 |
Attributes | ignore_on_read |
Children | card_name, export_format, separator, process_each_point, end_card, use_parameter, declare_parameter |
Used by | card, process_each_coverage, process_each_polygon |
Example |
Element <process_each_coverage>
Info | Indicator to loop through each coverage in the given context. |
Versions | 2 |
Attributes | ignore_on_read |
Children | card_name, export_format, separator, process_each_point, process_each_polygon, process_each_arc, end_card, use_parameter, declare_parameter |
Used by | card |
Example |
Element <process_each_material>
Info | Indicator to loop through each material in the given context. |
Versions | 2 |
Attributes | ignore_on_read |
Children | card_name, export_format, separator, end_card, use_parameter, declare_parameter, process_each_polygon |
Used by | card, process_each_coverage, process_each_polygon |
Example |
Element <process_each_point>
Info | Indicator to loop through each point in the given context. |
Versions | 2 |
Attributes | ignore_on_read |
Children | card_name, export_format, separator, end_card, use_parameter, declare_parameter |
Used by | card, process_each_coverage, process_each_polygon, process_each_arc |
Example |
Element <process_each_polygon>
Info | Indicator to loop through each polygon in the given context. |
Versions | 2 |
Attributes | ignore_on_read |
Children | card_name, export_format, separator, process_each_point, process_each_arc, end_card, use_parameter, declare_parameter |
Used by | card, process_each_coverage |
Example |
Element <process_each_row>
Info | Indicator to loop through each row in a table. Has the widget attribute that must be used. The widget attribute needs to be set to the name of a widget which belongs to the table to be iterated through. To iterate through the rows of a curve widget, use the name of the curve widget and a keyword, such as “#x”. |
Versions | 2 |
Attributes | ignore_on_read, widget |
Children | process_column, card_name, export_format, separator |
Used by | process_column, card, process_each_coverage, process_each_polygon, process_each_arc, process_each_point |
Example |
<process_each_row widget = “someColumnWidget”> |
Element <process_on_condition>
Info | Indicator to perform a certain action only if the condition is satisfied. |
Versions | 2 |
Attributes | ignore_on_read |
Children | process_column, card, process_each_coverage, process_each_polygon, process_each_arc, process_each_point, card_name, export_format, separator |
Used by | process_column, card, process_each_coverage, process_each_polygon, process_each_arc, process_each_point |
Example |
Element <process_on_count>
Info | Indicator to perform a certain action only on certain iterations of a loop. |
Versions | 2 |
Attributes | ignore_on_read |
Children | process_column, card, process_each_coverage, process_each_polygon, process_each_arc, process_each_point, card_name, export_format, separator |
Used by | process_column, card, process_each_coverage, process_each_polygon, process_each_arc, process_each_point |
Example |
Element <separator>
Info | Determines how to separate text that is being exported into a text file. |
Versions | 1, 2 |
Attributes | none |
Children | none |
Used by | export_each_row |
Example | See <export_table> |
Attributes
Attribute @ <ignore_on_read>
Info | Ignore when reading |
Values | none |
Version | 2 |
Used by | export_format, export_group, export_optional, process_each_arc, process_each_coverage, process_each_material, process_each_point, process_each_polygon, process_each_row, process_on_condition, process_on_count, section |
Attribute @ <widget>
Info | Name of widget. In the case of xmdf_dataset it is the control_dataset. Process_each_row it is a column in a table |
Values | string |
Version | 3 |
Used by | xmdf_dataset, process_each_row |