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

    Parameters

    connection
    Connection to the library.
    password
    Password.
    rememberPassword
    Remember the password?
    Exceptions
    ExceptionDescription
    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.
    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
    Fill password in case you are connecting to a library which is protected by a password and the password is not saved in the connection. Set rememberPassword to 'True' if you want to save the password to the connection.
    Example
    This example shows how to connect to the library using library connection.
    // Obtain project before.
    Project project = ...
    
    // Create new connection or get any project connection.
    BaseLibraryConnection connection = ...
    
    project.ConnectToLibrary(connection);
    This example shows how to connect to the library using library connection and password.
    // Obtain project before.
    Project project = ...
    
    // Create new connection or get any project connection.
    BaseLibraryConnection connection = ...
    
    // The password will be remembered for next time.
    project.ConnectToLibrary(connection, "password", true);
    See Also