Harness proD API Help
EPLAN.Harness.API Namespace / Studio Class / OpenProject Method / OpenProject(ApiRecentProject) Method
Recently opened project. Get from EPLAN.Harness.API.Settings.StudioSettings.RecentProjects.
In This Topic
    OpenProject(ApiRecentProject) Method
    In This Topic
    Open a recently opened project.
    Syntax
    public Project OpenProject( 
       ApiRecentProject recentProject
    )

    Parameters

    recentProject
    Recently opened project. Get from EPLAN.Harness.API.Settings.StudioSettings.RecentProjects.

    Return Value

    Project object
    Exceptions
    ExceptionDescription
    Only one project can be opened at a time. Close CurrentProject and try it again.
    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.
    Unexpected error in HpD.
    Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property.
    Argument is null.
    This file was not found.
    File you are trying to open is locked by another user.
    Document was saved with an unsupported version of HpD.
    The exception that is thrown when the file has the wrong extension.
    Remarks

    If any problem occurs when connecting to the project's active library (e.g. wrong version of library) the library will be disconnected. Check project's property EPLAN.Harness.API.Projects.Documents.Project.ActiveConnection if it isn't a null reference (Nothing in Visual Basic). For detailed information about what was wrong, see the LOG file or try reconnecting the library using EPLAN.Harness.API.Projects.Documents.Project.ConnectToLibrary. You'll then get the relevant exception.

    See Also