|
|
|
|
|
Carga un archivo Diagram y crea una biblioteca de formas preestablecidas a partir de él. // 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" // 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 TempLibrary.Save(sFile) // Load the diagram as a library MyLibrary is diagLibrary MyLibrary.LoadLibrary(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> = <Library>.LoadLibrary(<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 Guardar. Observaciones - Una biblioteca corresponde a un fichero Diagram creado con Guardar (fichero ".wddiag").
- La función .LoadLibrary 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 .DeleteAll en el array de bibliotecas del diagrama. Ejemplo:
DIAGEDT_Diagram.Library.DeleteAll()
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|