Harness proD API Help
EPLAN.Harness.API Namespace / Library Class / ConnectToLibrary Method / ConnectToLibrary(BaseLibraryConnection,String,String,Boolean) Method
Connection to the library.
User name.
Password.
Remember the password?
Example
In This Topic
    ConnectToLibrary(BaseLibraryConnection,String,String,Boolean) Method
    In This Topic
    Connect to library.
    Syntax

    Parameters

    connection
    Connection to the library.
    userName
    User name.
    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 the library has the wrong version.
    The exception that is thrown when there is a problem with the connection of an occurrence.
    Remarks

    Set rememberPassword to 'True' if you want to save the userName and password to the connection.

    Connected library is available through CurrentLibrary.

    Example
    This example shows how to connect to the library using library connection, user name and password.
    Library library = Library.GetInstance();
    
    // Create new connection or get any recent connection.
    BaseLibraryConnection connection = ...
    
    library.ConnectToLibrary(connection, "user name", "password");
    See Also