Skip to main content

ZOS-API interface 2024 R2 SP02

ZOSAPI.Tools.General.IRestoreArchive Interface Reference

Last update: 17.07.2025

Interfaces and methods for restoring a ZAR file. This interface can be accessed via the IOpticalSystemTools interface. More...

Inheritance diagram for ZOSAPI.Tools.General.IRestoreArchive:

Public Member Functions

ArchiveFileStatus SetFileName (string archiveFile)
 Sets the name of the input archive.
 
string GetOutputFolder ()
 Gets the currently selected output folder.
 
bool SetOutputFolder (string folder)
 Sets the desired output folder.
 
string GetFileNameInArchive (int fileNumber)
 Gets the file name for the specified file in the archive.
 
void SetFileOverwrite (int fileNumber, bool allowOverwrite)
 Sets a flag determining whether the file at the specified index will be overwritten if it already exists.
 
void SetFilesAllOverwrite ()
 All files will be overwritten if they exist.
 
void SetFilesNoOverwrite ()
 No files will be overwritten.
 
- Public Member Functions inherited from ZOSAPI.Tools.ISystemTool
bool Run ()
 Start the tool. Note that for synchronous tools (see IsAsynchronous), this call will block until completion. If it is asynchronous it will start running but return immediately.
 
bool RunAndWaitForCompletion ()
 Sames as calling Run followed by WaitForCompletion.
 
bool WaitForCompletion ()
 Waits for the asynchronous tool to complete.
 
bool Cancel ()
 Cancels the currently running asynchronous tool.
 
bool Close ()
 Closes this tool and frees up and associated resources.
 
RunStatus WaitWithTimeout (double timeOutSeconds)
 Waits for the currently running tool to complete, with a specified time out value. Note that if the timeout is exceeded this method will return, however the tool will continue to run. Also note that this method will not start the tool running if it is not already.
 
RunStatus RunAndWaitWithTimeout (double timeOutSeconds)
 Starts the tool running, and waits for it to complete with the specified timeout value. Note that if the timeout is exceeded this method will return, however the tool will continue to run.
 

Properties

string ArchiveFile [get]
 Gets the name of the currently selected input archive.
 
int NumberOfFilesInArchive [get]
 Gets the number of files stored in the specified archive.
 
bool ExtractAllFilesToProjectDirectory [get, set]
 
- Properties inherited from ZOSAPI.Tools.ISystemTool
int Progress [get]
 Gets the progress of the current tool, if supported.
 
string Status [get]
 Gets the status of the current tool, if supporoted.
 
bool IsRunning [get]
 Gets a value indicating whether the tool is currently running asynchronously.
 
bool CanCancel [get]
 Gets a value indicating whether the tool can be cancelled.
 
bool IsAsynchronous [get]
 Gets a value indicating whether the tool runs asynchronously (i.e. on a thread).
 
bool IsFiniteDuration [get]
 Gets a value indicating whether this tool will complete on its own.
 
bool IsValid [get]
 Gets a value indicating whether the input settings are valid.
 
bool Succeeded [get]
 Gets a value indicating whether the tool execution succeeded.
 
string ErrorMessage [get]
 If Succeeded is false, get the error messages; otherwise, null.
 

Detailed Description

Interfaces and methods for restoring a ZAR file. This interface can be accessed via the IOpticalSystemTools interface.

Member Function Documentation

◆ GetFileNameInArchive()

string ZOSAPI.Tools.General.IRestoreArchive.GetFileNameInArchive ( int  fileNumber)

Gets the file name for the specified file in the archive.

Parameters
fileNumberThe file number (0 - NumberOfFilesInArchive-1).
Returns

◆ GetOutputFolder()

string ZOSAPI.Tools.General.IRestoreArchive.GetOutputFolder ( )

Gets the currently selected output folder.

Returns

◆ SetFileName()

ArchiveFileStatus ZOSAPI.Tools.General.IRestoreArchive.SetFileName ( string  archiveFile)

Sets the name of the input archive.

Parameters
archiveFileThe full path to the archive file.
Returns
The results from trying to read the archive.

◆ SetFileOverwrite()

void ZOSAPI.Tools.General.IRestoreArchive.SetFileOverwrite ( int  fileNumber,
bool  allowOverwrite 
)

Sets a flag determining whether the file at the specified index will be overwritten if it already exists.

Parameters
fileNumberThe file number (see GetFileNameInArchive).
allowOverwriteif set to true the file will be overwritten; otherwise it will be skipped.

◆ SetFilesAllOverwrite()

void ZOSAPI.Tools.General.IRestoreArchive.SetFilesAllOverwrite ( )

All files will be overwritten if they exist.

◆ SetFilesNoOverwrite()

void ZOSAPI.Tools.General.IRestoreArchive.SetFilesNoOverwrite ( )

No files will be overwritten.

◆ SetOutputFolder()

bool ZOSAPI.Tools.General.IRestoreArchive.SetOutputFolder ( string  folder)

Sets the desired output folder.

Parameters
folderThe folder.
Returns
true
if the specified folder is valid and exists; otherwise,
false
.

Property Documentation

◆ ArchiveFile

string ZOSAPI.Tools.General.IRestoreArchive.ArchiveFile
get

Gets the name of the currently selected input archive.

The full path to the archive file.

◆ ExtractAllFilesToProjectDirectory

bool ZOSAPI.Tools.General.IRestoreArchive.ExtractAllFilesToProjectDirectory
getset

◆ NumberOfFilesInArchive

int ZOSAPI.Tools.General.IRestoreArchive.NumberOfFilesInArchive
get

Gets the number of files stored in the specified archive.

The number of files in archive.

Connect with Ansys