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

# ReferenceDesign Class Reference

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

defines information on imported data and files given a reference design

## Public Types

| Type | Name |
| - | - |
|  typedef std::vector\< [ImportItemInfo](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_import_item_info.md) > | [ImportItemInfoVector](#a41044fbbae50b73ea1a54077da1e0c9c) a set of data items |
|  typedef boost::shared\_ptr\< [MeshMapperBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_mesh_mapper_base.md) > | [MeshMapperBasePtr](#a134ae1c682574d00349ec0bdb8d7fe42) a shared pointer type for [MeshMapperBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_mesh_mapper_base.md) |

## 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 if the settings are valid and produces an error. |
| string | [generateScriptOfSettingsDefinition](#a2b231c5114f13957397147c8d2e73b6a) () Generates a Lua script that is used to build up this object. |
| void | [import](#a979a02f7e23e0bce25332c3fe725f76c) ([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), int sample\_number, string design\_path="", bool do\_not\_check\_settings=false) imports a design from disk |
| | [ReferenceDesign](#a747693ad8a1ff2ac0aa9ef1d0fe4b70f) (string the\_base\_path) Initializes the object with the base path given and sets further defaults. |
| | [setBasePath](#aa2ba2b1794ac9bad08da653ea8c99eda) (string path) sets a new base path. This includes changing the relative path definition of the already parsed files. |

### Modify file list

| Type | Name |
| - | - |
| | [addFile\_2dGrid](#a3f531f9141854fb6e661f8aa66329f96) ([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), string filename) Adds information from a CSV file with Grid information. |
| | [addFile\_3dGrid](#a54f99da4a501ea028ec621577ff149cb) ([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), string filename) Adds information from a CSV file with Grid information. |
| | [addFile\_Abaqus](#afd5c422a5396fc7f6fc9d67639056f22) ([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), string filename) Adds information from a file in Abaqus format. |
| | [addFile\_ANSYS\_APDL](#ad910539acbf3b9335eb049ead8d0eab1) ([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), string filename) Adds information from an ANSYS Mechanical APDL file either in APDL-style format, or in cdb blocked as well as unblocked format. |
| | [addFile\_ANSYS\_RST](#a1b5ff1759d329f5a852a0e14e29343c0) ([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), string filename) Adds information from an ANSYS binary structural or coupled-field analysis file. |
| | [addFile\_Image](#a1275367105e2c8901916e138e7cfca39) ([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), string filename) Adds information from a file in a pixel image format. |
| | [addFile\_LSDyna\_Dynain](#a1b8a91fa4a2873763aa6cc4ab27527c6) ([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), string filename) adds information from a file in LS-DYNA Dynain format. |
| | [addFile\_LSPrePost](#ac4b1f9b78214f1ad46dead046c98659e) ([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), string filename) adds information from a file in LS-PrePost (LS-DYNA) format. |
| | [addFile\_NastranInput](#a65b79da7516c43d19afddd630376e478) ([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), string filename) Adds information from a file in NASTRAN format. |
| | [addFile\_PamstampDataAsc](#abb1734d74f4c44bea421e20aa23e963b) ([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), string filename) Adds information from a file in NASTRAN format. |
| | [addFile\_PERMAS](#ab673c9293b5fc4fc3c8c2cbd5e663adb) ([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), string filename) Adds information from a file in PERMAS format. |
| | [addFile\_STL](#ad5c4c8b3993209b6356f59233da1da48) ([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), string filename) Adds information from a file in STL format. |
| | [addFile\_ElementDataCSV](#a69cfbc9c84840bb99ee4c2406e8982ca) ([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), string filename) Adds element data information from a file in CSV format. |
| | [addFile\_NodeDataCSV](#a897d79d7afae207e2a37efe46cf6e099) ([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), string filename) Adds node data information from a file in CSV format. |
| | [addFile\_SignalMeshCSV](#a65638c0dc45c447e1ce31c172c4e568a) ([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), string filename) Adds node data information from a signal file in CSV format. |
| | [addFile\_SignalDataCSV](#ac610b2839029ab3554d6b8961cd74f0b) ([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), string filename) Adds node data information from a signal file in CSV format. |
| | [addFile\_FLUENT\_CSV](#a1cbe5b36f92cdfe01c6f2acbaf34d590) ([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), string filename) adds information from a file in FLUENT result CSV format. |
| | [addFile\_VTK](#a34d895ea81537ef302bc29c126356eb9) ([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), string filename) Adds information from a file in VTK format. |
| | [removeFileFromList](#adc5b63f5d31ab0a4abf354b4934514f7) (string filename) removes all import data from item list which is associated with the sepcified file |
| std::vector\< string > | [getFiles](#a933cb1c407847079e005bdb46056cbfd) () assembles the complete list of files being known to this class |
| std::vector\< string > | [getFilesToImport](#a834da9fe4249630dcb02fff987c41a22) () Assembles a list of files which are to be imported (only the files for which one selected "import" are exported here) |

### Modify file item properties

| Type | Name |
| - | - |
| | [addItem](#a51da3543fdd29777389205577f4a2849) ([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), [ImportItemInfo](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_import_item_info.md) new\_item) adds a single item to trhe list of import data |
| | [setImportItem](#a39cc40da8396870fcb5ffce2732ad45a) (number item, bool do\_import) Sets if the item is to be imported There is no error checking! |
| | [setImportIdent](#a16c93a180125b6a7d85a41bba4cbff04) (number item, string ident, [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)) Sets the new ident used for import The ident is automatically modified to be unique and allowed. Further, the list of items is resorted! |
| | [sortItems](#ab71d843a916619570506d44ba030f4c2) () sorts the vector of item information |
| std::vector\< number > | [getItemsForFile](#accd09dc4f762c4b4b2e533e625b1a0ea) (string filename) assembles a list of items which are to be imported from a specific file |
| number | [getItemIndex](#af5edf7e140f1826d224c8d7a2417b2cb) (string filename, [ImportItemInfo::Type](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_import_item_info.md#a1d1cfd8ffb84e947f82999c682b666a7) data\_type, string input\_ident, number column=0) gets the index of the respective item if existing |
| | [clear](#aa821bec12eaa7e0f649397c9675ff505) () deletes all import items |

### Modify mesh mapper

| Type | Name |
| - | - |
| | [setMeshMapper](#a74b36e749ed3b693b484d81e53d1f711) ([MeshMapperBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_mesh_mapper_base.md) mapper) sets the (in)compatible mesh mapper object |
| [MeshMapperBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_mesh_mapper_base.md) | [meshMapper](#a34271ccf735c92b0a624cd9ec42e3988) () |
| [MeshMapperBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_mesh_mapper_base.md) | [meshMapperRef](#a135afdadbeabf58cddabd5936c3d4f62) () |

## Public Attributes

| Type | Name |
| - | - |
| string | [base\_path](#a1be53c8e392d898f99ddc804ff403c84) Specifies the base path. Must be changed only via [setBasePath()](#aa2ba2b1794ac9bad08da653ea8c99eda)! |
|  bool | [check\_on\_duplicate\_idents\_in\_database](#ab5607495ca904981a64eba8a947560b8) defines if quantities to be imported must not exist in the global database In this case, all methods will propose idents which make the new imported data unique. |
| [ImportItemInfoVector](#a41044fbbae50b73ea1a54077da1e0c9c) | [items](#a6ae81b54d8b4c8017039fde932ea27d9) stores all parsed data item information |

## Detailed Description

defines information on imported data and files given a reference design

This class contains settings for an example design directory (the base\_path). These settings include file formats, data items to be imported etc.

Note, the currently stored data must be kept "functional" at all times. If you add a new file using the appropriate function, this will take care for you. If you change the data items from outside (GUI etc.) you must use the function [check()](#a47c34ec1e578c2ce27cf1c5fcd0d1704) in order to approve the changes. If the changes are erroneous, the next addFIle-method call may lead to undefined behaviour.

## Constructor & Destructor Documentation

### ReferenceDesign()

```cpp theme={null}
ReferenceDesign(string the_base_path)
```

Initializes the object with the base path given and sets further defaults.

**Parameters**

| Name | Description |
| - | - |
| the\_base\_path | Defines the base path. Refer to base\_path for further remarks, |

## Member Function Documentation

### addFile\_2dGrid()

```cpp theme={null}
addFile_2dGrid(
    Structure database,
    string filename
)
```

Adds information from a CSV file with Grid information.

Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory. Otherwise it will be tried to interpret the filename as absolute path |

### addFile\_3dGrid()

```cpp theme={null}
addFile_3dGrid(
    Structure database,
    string filename
)
```

Adds information from a CSV file with Grid information.

Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory. Otherwise it will be tried to interpret the filename as absolute path |

### addFile\_Abaqus()

```cpp theme={null}
addFile_Abaqus(
    Structure database,
    string filename
)
```

Adds information from a file in Abaqus format.

Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory. Otherwise it will be tried to interpret the filename as absolute path |

### addFile\_ANSYS\_APDL()

```cpp theme={null}
addFile_ANSYS_APDL(
    Structure database,
    string filename
)
```

Adds information from an ANSYS Mechanical APDL file either in APDL-style format, or in cdb blocked as well as unblocked format.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Interpred either relative to the base path or to the working directory, or interpreted as absolute path. If none of these options match an exsisting file, an exception will be thrown |

### addFile\_ANSYS\_RST()

```cpp theme={null}
addFile_ANSYS_RST(
    Structure database,
    string filename
)
```

Adds information from an ANSYS binary structural or coupled-field analysis file.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Interpred either relative to the base path or to the working directory, or interpreted as absolute path. If none of these options match an exsisting file, an exception will be thrown |

### addFile\_ElementDataCSV()

```cpp theme={null}
addFile_ElementDataCSV(
    Structure database,
    string filename
)
```

Adds element data information from a file in CSV format.

Only element data items are supported. If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | the current database where the items are to be imported |
| filename | the file to be parsed. Is relative the base\_path or (if this is not existing, take it as absolute path or relative to working dir) |

### addFile\_FLUENT\_CSV()

```cpp theme={null}
addFile_FLUENT_CSV(
    Structure database,
    string filename
)
```

adds information from a file in FLUENT result CSV format.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path |

### addFile\_Image()

```cpp theme={null}
addFile_Image(
    Structure database,
    string filename
)
```

Adds information from a file in a pixel image format.

Multiple data items per file are supported. It is checked on validity using the pixel dimensions (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Interpred either relative to the base path or to the working directory, or interpreted as absolute path. If none of these options match an exsisting file, an exception will be thrown |

### addFile\_LSDyna\_Dynain()

```cpp theme={null}
addFile_LSDyna_Dynain(
    Structure database,
    string filename
)
```

adds information from a file in LS-DYNA Dynain format.

Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path |

### addFile\_LSPrePost()

```cpp theme={null}
addFile_LSPrePost(
    Structure database,
    string filename
)
```

adds information from a file in LS-PrePost (LS-DYNA) format.

Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path |

### addFile\_NastranInput()

```cpp theme={null}
addFile_NastranInput(
    Structure database,
    string filename
)
```

Adds information from a file in NASTRAN format.

The file will be read and interpreted as input file (\*.dat, \*bdf) with a clearly and reliable defined data structure described in [MSC Nastran Quick Reference Guide](http://simcompanion.mscsoftware.com/infocenter/index?page=contentchannel=DOCUMENTATIONcat=MSC__MD_NASTRAN_DOCUMENTATION) Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive).

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Is relative to the base\_path or if this is not existing, try to take it as absolute path or relative to the working dir. |

### addFile\_NodeDataCSV()

```cpp theme={null}
addFile_NodeDataCSV(
    Structure database,
    string filename
)
```

Adds node data information from a file in CSV format.

Only node data items are supported. If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | the current database where the items are to be imported |
| filename | the file to be parsed. Is relative the base\_path or (if this is not existing, take it as absolute path or relative to working dir) |

### addFile\_PamstampDataAsc()

```cpp theme={null}
addFile_PamstampDataAsc(
    Structure database,
    string filename
)
```

Adds information from a file in NASTRAN format.

The file will be read and interpreted as data file. At this time we don't know any standard or at least a common format for Nastran output data. In fact, we don't know where the data format comes from... Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Is relative to the base\_path or if this is not existing, try to take it as absolute path or relative to the working dir. |

### addFile\_PERMAS()

```cpp theme={null}
addFile_PERMAS(
    Structure database,
    string filename
)
```

Adds information from a file in PERMAS format.

Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path |

### addFile\_SignalDataCSV()

```cpp theme={null}
addFile_SignalDataCSV(
    Structure database,
    string filename
)
```

Adds node data information from a signal file in CSV format.

Only node data items are supported. If the data items are already existing, their names will be changed. The vector is reordered.

Only the data and not the mesh will be imported.

**Parameters**

| Name | Description |
| - | - |
| database | The database where the items are to be imported |
| filename | The file to be parsed. As first guess, the path is interpreted relative to the base\_path. If this fails, the path is read as absolute path or - as last option - relative to the working dir. |

### addFile\_SignalMeshCSV()

```cpp theme={null}
addFile_SignalMeshCSV(
    Structure database,
    string filename
)
```

Adds node data information from a signal file in CSV format.

Only node data items are supported. If the data items are already existing, their names will be changed. The vector is reordered.

Both data and mesh will be imported.

**Parameters**

| Name | Description |
| - | - |
| database | The database where the items are to be imported |
| filename | The file to be parsed. As first guess, the path is interpreted relative to the base\_path. If this fails, the path is read as absolute path or - as last option - relative to the working dir. |

### addFile\_STL()

```cpp theme={null}
addFile_STL(
    Structure database,
    string filename
)
```

Adds information from a file in STL format.

Only geometric information can be imported. STL import makes only sense in combination with incompatible mesh mappers.

**Parameters**

| Name | Description |
| - | - |
| database | the current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory or it will be tried to interpret the filename as absolute path |

### addFile\_VTK()

```cpp theme={null}
addFile_VTK(
    Structure database,
    string filename
)
```

Adds information from a file in VTK format.

Multiple data items per file are supported. If the file consists geometric information, it is checked on validity (with a warning and being added inactive). If the data items are already existing, their names will be changed. The vector is reordered.

**Parameters**

| Name | Description |
| - | - |
| database | The current database where the items are to be imported |
| filename | The file to be parsed. Relative to the base path, or if not existing, relative to the working directory. Otherwise it will be tried to interpret the filename as absolute path |

### addItem()

```cpp theme={null}
addItem(
    Structure database,
    ImportItemInfo new_item
)
```

adds a single item to trhe list of import data

**Parameters**

| Name | Description |
| - | - |
| database | the database we refer to |
| new\_item | the new item |

> [!NOTE]
>
> This method is used for directly modifying the data. It is not intended to be used by the user/GUI, but by [generateScriptOfSettingsDefinition()](#a2b231c5114f13957397147c8d2e73b6a).

### check()

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

checks if the settings are valid and produces an error.

**Parameters**

| Name | Description |
| - | - |
| database | the data base |

### generateScriptOfSettingsDefinition()

```cpp theme={null}
string generateScriptOfSettingsDefinition()
```

Generates a Lua script that is used to build up this object.

**Returns**

The script code. Ends with a newline.

> [!NOTE]
>
> This script works only for the global reference design (due to restrictions in itself and other classes)

### getFiles()

```cpp theme={null}
std::vector< string > getFiles()
```

assembles the complete list of files being known to this class

This is a compact view onto the contained data, since multiple items may be imported from a single file.

**Returns**

a list of filenames. The file names are relative to the base path.

### getFilesToImport()

```cpp theme={null}
std::vector< string > getFilesToImport()
```

Assembles a list of files which are to be imported (only the files for which one selected "import" are exported here)

This is a compact view onto the contained data, since multiple items may be imported from a single file and some files may be inactive.

**Returns**

a list of filenames. The file names are relative to the base path.

### getItemIndex()

```cpp theme={null}
number getItemIndex(
    string filename,
    ImportItemInfo::Type data_type,
    string input_ident,
    number column = 0
)
```

gets the index of the respective item if existing

**Parameters**

| Name | Description |
| - | - |
| filename | the filename relative to the base directory |
| data\_type | the data type, e.g. "coordinate along x direction" |
| input\_ident | the input ident, e.g. "thickness" |
| column | the column index for tensor fields (else 0) |

**Returns**

index to the item in the vector items. Throws an exception if not existing

### getItemsForFile()

```cpp theme={null}
std::vector< number > getItemsForFile(string filename)
```

assembles a list of items which are to be imported from a specific file

**Parameters**

| Name | Description |
| - | - |
| filename | the file name for which all items to be imported are searched. |

**Returns**

a list of integer indices in ascending order. Each index refers to an Item in the vector items. If no data is to be imported from the requested file, an empty list is returned.

### import()

```cpp theme={null}
void import(
    Structure database,
    int sample_number,
    string design_path = "",
    bool do_not_check_settings = false
)
```

imports a design from disk

**Parameters**

| Name | Description |
| - | - |
| database | the data base where all data is to be added |
| sample\_number | the design number which is used to define the design ident string for all new data in the database |
| design\_path | if this is empty, one takes the base\_path. Else one takes this string instead of this->base\_path |
| do\_not\_check\_settings | If this is true, then the contents of design\_info will not be checked on validity before starting the import. This is helpful when importing multiple designs at once. If this settings object is configured to check on duplicates in the global database, then a duplicate would be found after import of the first design always leading to an error! In this case, set this parameter to true. |

**Returns**

Returns an projection error report for each imported quantity. If no projection error occured during import, an empty quantity report will be returned. See [DesignProjectionErrorReport](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_design_projection_error_report.md) for further details If an error appears during import, an exception is thrown. Nevertheless, the method tries to import as much data as possible before quit.

### meshMapper()

```cpp theme={null}
MeshMapperBase meshMapper()
```

**Returns**

a reference to the (in)compatible mesh mapper object

### meshMapperRef()

```cpp theme={null}
MeshMapperBase meshMapperRef()
```

**Returns**

a modifyable reference to the (in)compatible mesh mapper object

### removeFileFromList()

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

removes all import data from item list which is associated with the sepcified file

**Parameters**

| Name | Description |
| - | - |
| filename | the file name of the file which is to be removed from import item list (exact match!). |

**Exceptions**

| Name | Description |
| - | - |
| std::exception | if the file does not exist in the list. |

### setBasePath()

```cpp theme={null}
setBasePath(string path)
```

sets a new base path. This includes changing the relative path definition of the already parsed files.

**Parameters**

| Name | Description |
| - | - |
| path | the base path |

### setImportIdent()

```cpp theme={null}
setImportIdent(
    number item,
    string ident,
    Structure database
)
```

Sets the new ident used for import The ident is automatically modified to be unique and allowed. Further, the list of items is resorted!

**Parameters**

| Name | Description |
| - | - |
| item | the index in items vector |
| ident | the new value of "imported\_ident" |
| database | the database (used for checking the ident on being allowed). |

### setImportItem()

```cpp theme={null}
setImportItem(
    number item,
    bool do_import
)
```

Sets if the item is to be imported There is no error checking!

**Parameters**

| Name | Description |
| - | - |
| item | the index in items vector |
| do\_import | the new value of "do\_import". |

### setMeshMapper()

```cpp theme={null}
setMeshMapper(MeshMapperBase mapper)
```

sets the (in)compatible mesh mapper object

**Parameters**

| Name | Description |
| - | - |
| mapper | the new mapping handler |

## Member Data Documentation

### base\_path

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

Specifies the base path. Must be changed only via [setBasePath()](#aa2ba2b1794ac9bad08da653ea8c99eda)!

base\_path should always point to an existing absolute filesystem directory otherwise an exception may occour during program execution.
