| control.Region(n).AnySeries([n]).SetDataFile( sFileName, [sLines2Read], [sFields2Read], [sFieldDelimiter], [nReverse]) | ||
| Purpose | Defines a file which contains the data for any series. | |
| Parameter | ||
| sFileName String | Path and name of the file, which contains the data. The file must be a normal text file, where each line is terminated either with a single carriage return (CR) or with a carriage return+line feed (CRLF) and where each line contains either one single data value or multiple data values, separated by the same delimiter. CSV-files (which you can create for example with MS EXCEL) belong to such a species of files. | |
| sLines2Read String | Lines to be read. The first line has index 1. There are several possible cases:
| |
| sFields2Read String | Defines the fields of the lines, which shall be read. Each field must be separated by a certain delimiter. The first field has index 1. There are three possible cases:
| |
| sFieldDelimiter String | Defines the delimiter, which separates the fields within a line. If omitted, the list separator, which is found in the system settings for the local user, is assumed. If no entry is found, a comma "," is assumed. | |
| nReverse Long (Boolean) | This parameter is obsolete, just pass FALSE or 0. | |
| Return value | If successful the number of read data values or, in case of an error, an element of the RMCError enumeration. | |
| Remarks | There are four ways to pass the data values to your series:
| |
| Example | RMChartX1.AddRegion ' Add a Line series to the region: RMChartX1.Region(1).AddLineSeries ' Read from a file field number 2 of the last 30 lines: RMChartX1.Region(1).LineSeries(1).SetDataFile = "dow2004.csv","-30","2",";",0 There are several example files, which demonstrate how to use this way of data passing: dj-dax-nasdaq.rmc, dj and nasdaq 2004.rmc, xycorrealtion.rmc, candlesticks.rmc, 2 regions.rmc. Load them into RMCDesigner, get the source and look how they make use of this function. | |