Declaration: TParticles.ExportAsCSV (FName, DataID: string; Separator: char; kx, dx, ky, dy: double; MinSize: integer; MinRelevance, MinAuxPar: double; ClassNums: TIntArray; MetaData: TMetaData; UseComma: boolean): integer;
The function ExportAsCSV exports the particles in CSV format to the file specified by FName. The parameter DataID can be used to store a unique data id along with the particle data.

The Separator parameter specifies the separator used for the CSV format (standard values are comma or semicolon, depending on the language settings of your computer). The set of exported particles can be filtered by the following parameters:

MinSize determines the minimum required size of the particles in pixels
MinRelevance speficies the minimum relevance parameter
MinAuxPar controls the minimum required auxiliary value
ClassNums contains the list of class numbers to be exported, setting ClassNums to nil defaults to including all classes

The parameters kx, dx, ky and dy are optional scaling coefficients which are used to scale the exported geometric data (ppXPos, ppYPos, ppLeftEdge, ppRightEdge, ppBottomEdge, ppTopEdge, ppCenterX, ppCenterY - see TPartProps for details) if required. Setting all four parameters to zero values defaults to unscaled (pixel) data.

The parameter MetaData contains the image metadata and the parameter UseComma controls whether a decimal point or a comma is used for floating point values.

The function returns the following error codes:

 0 ... everything is OK, the particle data have been exported successfully
-1 ... the file cannot be written

Hint: In order to access the particles currently loaded in the particle editor you can use the pre-declared global variable PEData.