Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / Document Class / Close Method
Close document in background without showing it in UI. Use when working with bigger bunch of documents at once to avoid refreshing UI constantly. You are responsible for calling the Project.UpdateProjectStructure method at the end, otherwise the state of the project structure is undefined.
In This Topic
    Close Method (Document)
    In This Topic
    Close this document.
    Syntax
    public virtual void Close( 
       bool silent
    )

    Parameters

    silent
    Close document in background without showing it in UI. Use when working with bigger bunch of documents at once to avoid refreshing UI constantly. You are responsible for calling the Project.UpdateProjectStructure method at the end, otherwise the state of the project structure is undefined.
    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.

    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 already closed, this method does nothing.

    See Also