Harness proD API Help
EPLAN.Harness.API.DataStructures.LibraryConnections Namespace / MasterData2022LibraryConnection Class
Members Example
In This Topic
    MasterData2022LibraryConnection Class
    In This Topic
    Connection to the EPLAN Platform master data library.
    Inheritance Hierarchy

    System.Object
       EPLAN.Harness.API.DataStructures.LibraryConnections.BaseLibraryConnection
          EPLAN.Harness.API.DataStructures.LibraryConnections.BaseSqlLibraryConnection
             EPLAN.Harness.API.DataStructures.LibraryConnections.MasterData2022LibraryConnection

    Syntax
    public class MasterData2022LibraryConnection : BaseSqlLibraryConnection 
    Example
    This example shows how to create new connections to master data library.
    // Create connection using windows authentication.
    MasterData2022LibraryConnection connection = new MasterData2022LibraryConnection("serverName", "database", true);
    
    // Path to the created connection file.
    string path = connection.ConnectionPath;
    
    // Using this connection you can connect a project to the library.
    Project project = ...
    project.ConnectToLibrary(connection):
    
    // If you use SQL authentication, you must specify userName and password:
    // 1.) When creating a connection (only once):
    connection = new MasterData2022LibraryConnection("serverName", "database", "user name", "password");
    project.ConnectToLibrary(connection);
    
    // 2.) When connecting to the library (always when connecting to the library):
    connection = new MasterData2022LibraryConnection("serverName", "database", false);
    project.ConnectToLibrary(connection, "user name", "password");
    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
    Public Methods
     NameDescription
    Public Method Change saved data for connection to this connection. (Inherited from EPLAN.Harness.API.DataStructures.LibraryConnections.BaseSqlLibraryConnection)
    Top
    See Also