Search
Using Custom Shape Libraries

( a feature of FlowChartX Pro edition)

Loading a shape library

To load a custom shape library call the LoadShapeLib method. It takes as an argument the name of the dll file containing the shapes and returns the unique identifier of the library. You should store a reference to this identifier because it is used to specify the library in various other methods and properties.

Getting information

To get the unique identifier that is associated with a loaded library call the GetShapeLibGUID method. This identifier is also returned to you when the library is loaded. It is used to identify the library when calling various other methods. Use the ShapeLibCount function to get the number loaded shape libraries.

To get the number of shapes in a library call the GetShapeCount method. The user-friendly name of a shape library can be obtained through the GetShapeLibName method.

Using shapes

In order to assign a shape from a loaded library to a box, first you have to set the Style of the box to bsLibShape, and then call the SetShape box method. You can get the currently assigned shape of a box by invoking its GetShape method. To define a default library shape for all new boxes, set the BoxStyle flowchart property to bsLibShape and call the SetDefLibShape method.

Unloading libraries

If at some point of execution of your program a specific shape library is no longer needed, you can unload it by calling UnloadShapeLib. Alternatively you can unload all loaded libraries with a single call to UnloadAllShapeLibs.