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

    Parameters

    document
    Document to copy.
    silent
    Copy document in background without showing it in UI. Use when copying bigger bunch of documents at once to avoid refreshing UI constantly. You are responsible for calling the UpdateProjectStructure method at the end, otherwise the state of the project structure is undefined.

    Return Value

    Created document.
    Exceptions
    ExceptionDescription
    This file is not opened.
    The operation was not successful.
    The file is open.
    The operation was not successful.
    Remarks

    Document copy could be created just on closed documents. For more details see into the software help.

    When the copy document process is not successful, the EPLAN.Harness.API.Exceptions.FileCopyException is thrown.

    In case one of the copied documents is opened, this methods will fail.

    See Also