> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CreateSimulationArchive Class Reference

Part of [Import](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__import)

A struct collecting export information for random field simulation data.

## Public Member Functions

| Type | Name |
| - | - |
| | [check](#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gaebcac3a2836ec9fdf2e47bd812994b6b)) Checks validity of these data. |
| | [CreateSimulationArchive](#a1694082771d86e6a33750c071ff76a6c) ([ExportReferenceDesign](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_export_reference_design.md) [reference\_design](#acf3a932aa2f8b555c1a254385c014629), string the\_output\_file) constructor. It assumes that the base path is one directory level below the base path of the reference design. It further assumes a default for the design directory names and copies the information on the reference design |
| | [save](#a6a338dc4344270fcbccadf5667ef12f9) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gaebcac3a2836ec9fdf2e47bd812994b6b)) exports multiple designs to disk This method tries to export as much data as possible and does even proceed in case of errors. Important: the design directories to be exported to must already exist. |

## Public Attributes

| Type | Name |
| - | - |
|  string | [output\_file](#a8643191a264f6d55fead82a6d23a88b6) path (absolute path) |
| [ExportReferenceDesign](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_export_reference_design.md) | [reference\_design](#acf3a932aa2f8b555c1a254385c014629) stores the information on the reference design/design directory template (defines which data to be exported) |
|  bool | [replace\_files](#a2f8b3cba47ad64fb6bda4b6428a032d3) if true, already existing files are to be replaced |

## Detailed Description

A struct collecting export information for random field simulation data.

The idea is:

* use the old class [PrepareRandomFieldSimulation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_prepare_random_field_simulation.md) in a temporary directory
* compress the directory
* save the ZIP file as final target

## Constructor & Destructor Documentation

### CreateSimulationArchive()

```cpp theme={null}
CreateSimulationArchive(
    ExportReferenceDesign reference_design,
    string the_output_file
)
```

constructor. It assumes that the base path is one directory level below the base path of the reference design. It further assumes a default for the design directory names and copies the information on the reference design

**Parameters**

| Name | Description |
| - | - |
| reference\_design | contains info on the reference export design |
| the\_output\_file | defines the output file |

## Member Function Documentation

### check()

```cpp theme={null}
check(Structure database)
```

Checks validity of these data.

If any of the specified directories or files does not exist, an exception is thrown It also checks the validity of the reference design It further checks if any of the objects to be exported does not exist. And if the scalar data contain valid amplitudes

**Parameters**

| Name | Description |
| - | - |
| database | the data base where the data is stored |

### save()

```cpp theme={null}
save(Structure database)
```

exports multiple designs to disk This method tries to export as much data as possible and does even proceed in case of errors. Important: the design directories to be exported to must already exist.

**Parameters**

| Name | Description |
| - | - |
| database | the data base where all data is contained. |
