Void Project.Archive(String archivePath, Boolean overwrite, ArchiveSettings settings)
For Mechanical opened independently, without Workbench. Archive a Mechanical project.
Examples
The following two commands archive the current project with overwrite enabled and includes all result/solution files but excludes user files.
DataModel.Project.Archive(r"C:\project.mechpz", True, Ansys.ACT.Automation.Mechanical.ArchiveSettings(True, False))
settings = Ansys.ACT.Automation.Mechanical.ArchiveSettings()
settings.IncludeResultAndSolutionFiles = True
settings.IncludeUserFiles = False
DataModel.Project.Archive(r"C:\project.mechpz", True, settings)
Parameters
-
archivePath
Type: String
File path of the new archive.
-
overwrite
Type: Boolean
Optional - Overwrite an existing archive file located at archivePath if one exists. The default is False.
-
settings
Optional - Settings object to configure what files to include/exclude inside the archive file. The default includes all files.