|
|
|
|
DiagramLoadLibrary (Función) Carga un archivo Diagram y crea una biblioteca de formas preestablecidas a partir de él. // Add a new library MyLibrary is diagLibrary DiagramLoadLibrary(MyLibrary, "Furniture01.wddiag") MyLibrary.Name = "Furniture" DIAGEDT_Diagram.Library.Add(MyLibrary)
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.") Sintaxis
<Result> = DiagramLoadLibrary(<Library> , <File>)
<Result>: booleano - True si la biblioteca se ha cargado,
- False en caso contrario. ErrorInfo devuelve más detalles sobre el error.
<Library>: Variable de tipo diagLibrary Nombre de la diagLibrary Variable en la que se debe importar el archivo correspondiente a la biblioteca. <File>: Cadena de caracteres ruta completa del archivo Diagram correspondiente a la biblioteca que se va a importar. Este archivo corresponde a un Diagram previamente guardado con DiagramSave. Observaciones - Una biblioteca corresponde a un fichero Diagram creado con DiagramSave (fichero ".wddiag").
- La función DiagramLoadLibrary transforma un diagrama en una biblioteca de formas predefinidas que se puede mostrar en el panel izquierdo del control Editor de diagramas.
- Para utilizar solo las bibliotecas personalizadas, elimine las bibliotecas predeterminadas. Para ello, utilice la función ArrayDeleteAll en el array de bibliotecas del diagrama. Ejemplo:
ArrayDeleteAll(DIAGEDT_Diagram.Library)
Clasificación Lógica de negocio / UI: Código UI
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|