Harness proD API Help
EPLAN.Harness.API Namespace / Library Class / UpgradeLibrary Method / UpgradeLibrary(BaseLibraryConnection,String,Boolean) Method
Connection to the library.
Password.
Remember the password?
Example
In This Topic
    UpgradeLibrary(BaseLibraryConnection,String,Boolean) Method
    In This Topic
    Upgrade library specified by the connection to the current version.
    Syntax

    Parameters

    connection
    Connection to the library.
    password
    Password.
    rememberPassword
    Remember the password?
    Exceptions
    ExceptionDescription
    Api is not in an initialized state. You can get current state from Status property. If API is uninitialized, you can initialize it by calling Init(String,String[]) method. If API is in failed state, you can not resurrect it.
    This file was not found.
    The exception that is thrown when the file has the wrong extension.
    Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property.
    Argument is null.
    The exception that is thrown when there is a problem with security.
    The exception that is thrown when there is a problem with the connection of an occurrence.
    Remarks

    Only up-to-date library can be connected and used.

    Use if the ConnectToLibrary(BaseLibraryConnection,String,Boolean) method throws the EPLAN.Harness.API.Exceptions.LibraryVersionException.

    Must be called within the Library application.

    After this method is called the library is only upgraded, not connected.

    Example
    This example shows how to upgrade library using library connection.
    Library library = Library.GetInstance();
    
    // Create new connection or get any recent connection.
    BaseLibraryConnection connection = ...
    
    library.UpgradeLibrary(connection);
    This example shows how to upgrade library using library connection and password.
    Library library = Library.GetInstance();
    
    // Create new connection or get any recent connection.
    BaseLibraryConnection connection = ...
    
    // The password will be remembered for next time.
    library.UpgradeLibrary(connection, "password", true);
    See Also