API Help
Eplan.EplApi.DataModel Namespace / ProjectManager Class / OpenProject Method / OpenProject(String,OpenMode,Boolean) Method
Full link file name "C:\\Eplan\\P8\\Projects\\ESS_Sample_Project.elk"
Defines if the project should be automatically upgraded it its needed

In This Topic
    OpenProject(String,OpenMode,Boolean) Method
    In This Topic
    Opens a project in the requested mode if possible.
    Syntax

    Parameters

    linkFileName
    Full link file name "C:\\Eplan\\P8\\Projects\\ESS_Sample_Project.elk"
    wantedOpenMode
    upgradeIfNeeded
    Defines if the project should be automatically upgraded it its needed

    Return Value

    Project : project object
    Exceptions
    ExceptionDescription
    Thrown if the source project does not exist
    Thrown when linkFileName is null.
    Thrown when requested project cannot be open
    Thrown when LockProjectByDefault is true and a project cannot be locked.
    Thrown when project linkFileName has old database structure and needs to be upgraded.
    Thrown when project linkFileName has incompatible database structure and we can do nothing about it.
    Remarks
    This method works with a project and embedded libraries: project settings, symbol libraries and the function libraries. If the project is read-only (because its on cd-rom) or number of logical pages exceeds number of licensed logical pages the project hierarchy will be opened read-only. Otherwise the project will be open read-write or exclusive, depending on available multi-user licenses. The embedded libraries always are opened read-only. Projects created by older EPLAN versions can be upgraded automatically. In case of backed-up projects please use Eplan.EplApi.HEServices.Restore class. The openmode will only be the wanted one when its possible to open the project in this mode. The Open Mode can be tested with the function Project.IsReadOnly and Project.IsExclusive after opening.
    See Also