AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Editor de diagramas
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Carga un archivo Diagram y crea una biblioteca de formas preestablecidas a partir de él.
Ejemplo
// 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
Componente: wd290mdl.dll
Versión mínima requerida
  • Versión 27
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 24/05/2023

Señalar un error o enviar una sugerencia | Ayuda local