Purpose

The module CurveImport creates a CurveLists from a string representation. It was developed to load CurveLists from files that were saved with the PrintCurve module.

Usage

Enter the string representation of the CurveList you want to generate in the curveTable field. You can also load the string from a file, by specifying the filename in the filename field and pressing the Load button. Afterwards the string can still be modified and field values can be adapted. The output is a CurveList, that might contain multiple CurveData objects with one or more CurveSeries each.

Windows

Default Panel

../../../Projects/MLCurveUtils/Modules/mhelp/Images/Screenshots/CurveImport._default.png

Output Fields

outCurve

name: outCurve, type: MLBase

Parameter Fields

Field Index

Clear: Trigger Update: Trigger
Comment Indent Length: Integer Use comment lines as titles: Bool
Curve Style: Integer Use decimal comma: Bool
Curve Table: String  
Filename: String  
Load: Trigger  
Parser Mode: Enum  
Skip Lines: Integer  

Visible Fields

Parser Mode

name: parserMode, type: Enum, default: One value per row

Defines the mode for the table parser.

Values:

Title Name
One value per row One value per row
CSV Mode CSV Mode

Curve Table

name: curveTable, type: String

Sets a string defining the curve by x/y-value pairs.

Allowed formats:

  1. Single value per row: Value is treated as y value, x value is current line number starting with 1.
  2. Multiple values per line (See Parser Mode): First entry is used as x value. Further values are y values of CurveSeries.

Curve Style

name: style, type: Integer, default: 1

Sets the style of the curve. The style is limited to [1,12].

Filename

name: filename, type: String

Sets a filename to load a curve definition from file.

Load

name: load, type: Trigger

If pressed, the specified curve file is loaded by loading string into Curve Table.

Clear

name: clear, type: Trigger

Clears the string representation in Curve Table and the CurveList in outCurve.

Update

name: update, type: Trigger

If pressed, the module computes anew.

Skip Lines

name: numberOfHeaderLines, type: Integer, default: 0

Sets the number of header lines to skip in both parser modes (see Parser Mode).

Lines are skipped completely and comments will not be read to set the curve title (see Use comment lines as titles).

Lines starting with a # are considered a comment and do not need to be skipped. Negative values will be ignored. If given number of lines in the table, an empty list is returned.

Use decimal comma

name: usesDecimalComma, type: Bool, default: FALSE, deprecated name: usesDescimalComma

If checked, a comma is used for decimal numbers (instead of a point).

Use comment lines as titles

name: parseCommentsAsCurveTitles, type: Bool, default: FALSE

If checked, comment lines will be used as curve titles in Parser Mode One value per row.

Comment Indent Length

name: commentIndentLength, type: Integer, default: 2, minimum: 0

Sets the number of characters to be cut off from comment lines.