API Help
Eplan.EplApi.DataModel Namespace / ProjectManager Class / OpenProject Method / OpenProject(String,OpenMode) Method
Full link file name "C:\\Eplan\\P8\\Projects\\ESS_Sample_Project.elk"

In This Topic
    OpenProject(String,OpenMode) 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

    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 EPLAN versions lower than 2.4 need to be upgraded, otherwise an exception is thrown. If project it is an outsourced (.els files) or packed (.elp files) it can be opened by this function. In case of backed-up projects please use Eplan.EplApi.HEServices.Restore class. The open mode 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