Kopiert die angebene Bilbliothek von der geöffneten Datei in die Standard Bibliothek
Aufruf addLibraries("Bibliothek","Bibliothek")
Sub addLibraries(quell_LibName as String, ziel_LibName as String)
Dim oLibrary As Object
Dim oGlobalLibrary As Object
' Erst die mal die Module
oGlobalLibrary = GlobalScope.BasicLibraries
oLibrary = BasicLibraries
addLib(oGlobalLibrary, oLibrary, quell_libname,ziel_libname)
' Dann die Dialoge
oLibrary = DialogLibraries
oGlobalLibrary = GlobalScope.DialogLibraries
addLib(oGlobalLibrary, oLibrary, quell_libname,ziel_libname)
End Sub
sub addLib(oGlobalLib as object, oLib as object, quelle_lib as string, ziel_lib as
string)
Dim oquell_Lib As Object
Dim oZiel_Lib As Object
Dim Zaehler As Integer
Dim quellModules() as string
If oGlobalLib.hasByName(ziel_lib) = False Then
oGlobalLib.createLibrary( ziel_lib )
End If
oquell_Lib = oLib.getByName(quelle_lib)
quellModules = oquell_Lib.getElementNames()
If oLib.hasByName(quelle_lib) Then
oquell_Lib = oLib.getByName(quelle_lib)
quellModules = oquell_Lib.getElementNames()
for Zaehler=0 to ubound( quellModules())
oZiel_Lib = oGlobalLib.getByName(ziel_lib)
If oZiel_Lib.hasByName( quellModules(zaehler) ) = False Then
oZiel_Lib.insertByName( quellModules(zaehler),oquell_Lib.getByName(
quellModules(zaehler)))
End If
Next Zaehler
End If
end sub