Declaration: TParticles.AddNewClass (ClassName, UniqueClassID: string; ImgSzX, ImgSzY: integer): integer;
The function AddNewClass adds another class to the particle collection. The parameters ClassName and UniqueClassID specify the name of the new class and its unique identifier. The parameters ImgSzX and ImgSzY define the size of the corresponding image in pixels. The size parameters are evaluated only if the TParticles instance does not yet contain any particle data. They can be ignored otherwise (i.e. set to zero).

The function returns the following error codes:

>0 ... everything is OK, the returned number is the new class number
-1 ... the specified unique class identifier already exists
-2 ... either the ClassName or the UniqueClassID is empty

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