Eplan Platform API
Eplan.EplApi.HEServices Namespace / Restore Class / Project Method / Project(StringCollection,String,String,Boolean,Boolean) Method

Collection of archive file names (.zw1 files) to be restored. Must contain at least one archive file name with full path.

This parameter must be filled in all cases, regardless of whether one or more project(s) are to be restored.

Path into which the project(s) will be restored.

If only ONE project should be restored, the name of the target project must be set in this parameter (mandatory when restoring only one single project). Specifies only the project name, not the path.

If more than one project is restored (i.e. strColArchivenames contains more than one entry), the names of the target projects will be created from the names in the archive file. The strProjectName parameter is ignored in this case and can be left blank.

Specifies whether to unpack one or more packed project(s). This parameter should usually be set to false.

If set to true, in the strCollArchivenames parameter project link file name(s) (.elk) must be passed instead of archive name(s). In this case, the target project names are created from the names of these project link files.

false = "restore "normal" project(s)", true = "unpack packed project(s)"

Specifies whether to show a summary dialog (decider message box with the restore results for all project) at the end of the restore process.

false = "show summary dialog", true = "don't show summary dialog"

Example

In This Topic
    Project(StringCollection,String,String,Boolean,Boolean) Method
    In This Topic
    Restores one or more project(s) from archive files.
    Syntax

    Parameters

    Parameter NameDescription
    strColArchivenames

    Collection of archive file names (.zw1 files) to be restored. Must contain at least one archive file name with full path.

    This parameter must be filled in all cases, regardless of whether one or more project(s) are to be restored.

    strRestorePathPath into which the project(s) will be restored.
    strProjectName

    If only ONE project should be restored, the name of the target project must be set in this parameter (mandatory when restoring only one single project). Specifies only the project name, not the path.

    If more than one project is restored (i.e. strColArchivenames contains more than one entry), the names of the target projects will be created from the names in the archive file. The strProjectName parameter is ignored in this case and can be left blank.

    bUnpackProjects

    Specifies whether to unpack one or more packed project(s). This parameter should usually be set to false.

    If set to true, in the strCollArchivenames parameter project link file name(s) (.elk) must be passed instead of archive name(s). In this case, the target project names are created from the names of these project link files.

    false = "restore "normal" project(s)", true = "unpack packed project(s)"

    bQuietMode

    Specifies whether to show a summary dialog (decider message box with the restore results for all project) at the end of the restore process.

    false = "show summary dialog", true = "don't show summary dialog"

    Exceptions
    ExceptionDescription
    Thrown if an error occurred while restoring the project.
    Thrown if the internal interface for restoring could not be created.
    Remarks

    • If only one project is to be restored: The name of the target project must be specified in the strProjectName paramter.

    • If more than one project is to be restored: The names of the target projects will be created from the names in the archive files specified in the strColArchivenames parameter. The strProjectName parameter can be left blank. So the restored projects will have the same names as they were archived under.

    • If one or more packed project(s) are to be restored: Set the bUnpackProjects parameter to true and specify the project link file name(s) (.elk) in the strColArchivenames parameter.

    • If the target project already exists, it will be overwritten.

    • ProjectInfo.xml will always be restored.

    Example
    Restore oRestore = new Restore();
    StringCollection oArchives = new StringCollection();
    oArchives.Add("$(MD_PROJECTS)\\EPLAN_Sample_Project.zw1");
    oRestore.Project(oArchives,
                    "C:\\temp",
                    "EPLAN-DEMO_restored",
                    false,
                    false);
    
    
    See Also