Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / Report Class / Open Method
Open as read only if the document is locked? If the document is not locked, this argument has no effect.
Restore document from backup if exists? To determine whether the backup exists, use BackupExists.
In This Topic
    Open Method (Report)
    In This Topic
    Open this document.
    Syntax
    public override void Open( 
       bool tryReadOnly,
       bool useBackup
    )

    Parameters

    tryReadOnly
    Open as read only if the document is locked? If the document is not locked, this argument has no effect.
    useBackup
    Restore document from backup if exists? To determine whether the backup exists, use BackupExists.
    Exceptions
    ExceptionDescription
    The object is in invalid state. Obtain a new one.

    Internal error of HpD or HpD API.

    IMPORTANT: Throwing this exception changes HpD Api's state to Failed.

    This file was not found.
    Thrown when the document is locked by another user and the tryReadOnly is False. Set the argument to True to open this document in read-only mode.
    The operation was not successful.
    This operation was denied because of your license.
    Remarks

    Some methods requires a document to be opened or closed. This is written in method's documentation.

    If you use a method, that requires document to be opened/closed and it is not, EPLAN.Harness.API.Exceptions.FileClosedException or EPLAN.Harness.API.Exceptions.FileOpenedException is thrown.

    If the document is locked by another user you can open a document in read only mode using tryReadOnly argument. As a result you won't be able to perform some actions such as Save.

    If this document is already open, this method does nothing. To open read-only document in read-write mode, use Close and then Open again.

    See Also