> ## 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.

# ImportCoP Class Reference

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

imports [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values of amplitudes from CSV file

## 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 the settings |
| bool | [checkOverwriteExisting](#abdcd2125bfa27ba032579f06c6c15b41) ([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 if any [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values are already existing in the database |
| | [import](#a73dd3f56399568385400db0c3fc08295) ([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)) imports the [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values and inserts them into the database |
| | [ImportCoP](#a8939bd20c8a90fd23e86b01270f271aa) (string filename) Parses and imports a given file. |

## Public Attributes

| Type | Name |
| - | - |
| string | [file\_name](#a755d42f2e9c635ce2213e0efad62b796) destructor |
|  number | [min\_cop](#a9c4157039d23c5bdda684578b63c50e5) defines the minimum [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) being required for an input to be announced in the data table. If the total F-CoP is lower than or equal to this limit, it will not be created. Default: 0% |
|  bool | [overwrite\_existing](#ade25e60bd85c8b4abd4f5b416cae0eb9) is true if already existing output data objects will be replaced. In this case, also all depending objects of the already existing one will be deleted. |

## Detailed Description

imports [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values of amplitudes from CSV file

The CSV file is to be:

* separated by tabs
* header row must contain: #\tinput-ident-1\t...\tinput-ident-N\tTotal
* the other rows contain the respective [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values. An input parameter being not "important" is associated with a [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md)=0
* the first column contains the names of the amplitudes (responses). The response names will be associated with the amplitudes.

## Constructor & Destructor Documentation

### ImportCoP()

```cpp theme={null}
ImportCoP(string filename)
```

Parses and imports a given file.

**Parameters**

| Name | Description |
| - | - |
| filename | filename of the CSV file. |

## Member Function Documentation

### check()

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

checks the settings

**Parameters**

| Name | Description |
| - | - |
| database | the database where the imported data is supposed to be saved into |

### checkOverwriteExisting()

```cpp theme={null}
bool checkOverwriteExisting(Structure database)
```

checks if any [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values are already existing in the database

**Parameters**

| Name | Description |
| - | - |
| database | the database to be tested |

**Returns**

true if any [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values were already imported.

### import()

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

imports the [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values and inserts them into the database

**Parameters**

| Name | Description |
| - | - |
| database | the database where the imported data are saved to. |

## Member Data Documentation

### file\_name

```cpp theme={null}
string file_name
```

destructor

the file to be imported
