WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Loads a diagram file and creates a library of preset shapes from it.
// Add a new library
MyLibrary is diagLibrary
DiagramLoadLibrary(MyLibrary, "Furniture01.wddiag")
MyLibrary.Name = "Furniture"
sFile is string = fTempDir() + [ fSep ] + "custom_library.wddiag"
// Creates a library entirely through programming
TempLibrary is Diagram
D1 is diagOval
D1.Width = 50
D1.Height = 50
D1.Background.Color = DarkRed
Add(TempLibrary.Shape, D1)
D2 is diagOval
D2.Width = 50
D2.Height = 70
D2.Background.Color = DarkGreen
Add(TempLibrary.Shape, D2)
// Use the shapes of the temporary diagram to create the library
// Saves the diagram to the disk
DiagramSave(TempLibrary, sFile)
// Load the diagram as a library
MyLibrary is diagLibrary
DiagramLoadLibrary(MyLibrary, sFile)
MyLibrary.Name = "Custom"
// Adds the library to the Diagram Editor control
Add(DIAGEDT_Diagram.Library, MyLibrary)
ToastDisplay("The custom library has been added to the list.")
<Result> = DiagramLoadLibrary(<Library> , <File>)
<Result>: Boolean
  • True if the library has been loaded,
  • False otherwise. ErrorInfo returns more details about the error.
<Library>: diagLibrary variable
Name of the diagLibrary variable into which the file corresponding to the library must be imported.
<File>: Character string
Full path of the diagram file corresponding to the library to be imported. This file corresponds to a diagram previously saved with DiagramSave.
  • A library corresponds to a diagram file created with DiagramSave (".wddiag" file).
  • DiagramLoadLibrary transforms a diagram into a library of preset shapes that can be displayed in the left panel of the Diagram Editor control.
  • To use only your custom libraries, delete the default libraries. To do so, use ArrayDeleteAll on the array of libraries of the diagram. Example:
Business / UI classification: UI Code
Component: wd280mdl.dll
Minimum version required
  • Version 27
This page is also available for…
Click [Add] to post a comment