| RMC_SetLAXLabelsFile function. | ||
| Set the name and lines/fields of a file like *.csv, from where the labels of a label axis will be read. | ||
| Syntax | ||
| nResult& = RMC_SetLAXLabelsFile( ByVal nCtrlId (LONG), ByVal nRegion (LONG), ByRef sFilename (ASCIIZ), Optional ByRef sLines (ASCIIZ), Optional ByRef sFields (ASCIIZ), Optional ByRef sFieldDelimiter (ASCIIZ) ) |
||
| Parameter | ||
| nCtrlId (LONG) | ||
| Unique ID of the chart control, to which the label axis belongs. | ||
| nRegion (LONG) | ||
| Index of the region, to which the label axis belongs. | ||
| sFileName (ASCIIZ) | ||
| Name of the file (including path and extension), which holds the labels. | ||
| sLines (ASCIIZ) | ||
Defines the lines, which shall be read. Each line must be separated by
either $CRLF or $LF. The first line has index 1. There are several possible cases:
| ||
| sFields (ASCIIZ) | ||
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 (ASCIIZ) | ||
| 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. | ||
| Return value | ||
| positiv number | ||
| No error, number of successfully read data values. | ||
| RMC_ERROR_CTRLID | ||
| Wrong control ID (0 or no chart with this control ID was found). | ||
| RMC_ERROR_WRONGREGION | ||
| The region index is inexistent in the chart control. | ||
| RMC_ERROR_ALLOC | ||
| Error while allocating memory for the data. | ||
| RMC_ERROR_FILEFOUND | ||
| File was not found or is empty. | ||
| RMC_ERROR_READLINES | ||
| No lines to read could be identified. | ||
| Remarks | ||
| Be sure that the file is in a proper condition: e.g. no empty lines, same number of fields in every line, a unique field separator, which is not part of the content of a field and so on, otherwise you will get unpredictable results. | ||
| Example | ||
i = RMC_AddLabelAxis(%ID_RMC,1,"",0,15) ' Add a label axis with no labels and 15 ticks (columns) on it i = RMC_SetLAXLabelsFile(%ID_RMC,1,"labels.csv","15","1") ' Set the label file, line 1 to 15, field 1 | ||