|
|
|
|
|
<diagLibrary variable>.LoadLibrary (Function) In french: <Variable diagBibliothèque>.ChargeBibliothèque Loads a diagram file and creates a library of preset shapes from it. // Add a new library MyLibrary is diagLibrary MyLibrary.LoadLibrary("Furniture01.wddiag") MyLibrary.Name = "Furniture" DIAGEDT_Diagram.Library.Add(MyLibrary) sFile is string = fTempDir() + [ fSep ] + "custom_library.wddiag"
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)
TempLibrary.Save(sFile)
MyLibrary is diagLibrary
MyLibrary.LoadLibrary(sFile)
MyLibrary.Name = "Custom"
Add(DIAGEDT_Diagram.Library, MyLibrary)
ToastDisplay("The custom library has been added to the list.")
Syntax
<Result> = <Library>.LoadLibrary(<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 <Diagram Editor>.Save. Remarks - A library corresponds to a diagram file created with <Diagram Editor>.Save (".wddiag" file).
- <diagLibrary variable>.LoadLibrary 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 <Array>.DeleteAll on the array of libraries of the diagram. Example:
DIAGEDT_Diagram.Library.DeleteAll()
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|