# Lectra - Modaris

## 1. Prepare the data using Lectra Modaris

### Extract the piece sections

* Open the model in Modaris and select the first piece to start from. In the following example the BACK piece.

<figure><img src="https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-cb6f6d5a08d372f6c1a204027dd90ca03cb2b929%2F1-lectra-modaris-home.png?alt=media" alt=""><figcaption><p>Workspace | <strong>Modaris V6</strong></p></figcaption></figure>

* Extract the first section **starting from the bottom and moving upwards**. This order is essential for correct data export.

{% hint style="info" %}
Only by following this exact extraction order can Pesipiuma correctly import the data.
{% endhint %}

<figure><img src="https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-d0651b5f7f85bfed40bc0748f313bb76dc5e854c%2F2-lectra-modaris-estrazione.png?alt=media" alt=""><figcaption><p>Extraction starting from the lowest section of the BACK piece | <strong>Modaris V6</strong></p></figcaption></figure>

* Once all sections have been extracted they will appear in the lower right part of the workspace ordered from left to right.

<figure><img src="https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-229fd2117a4ef1f1ceb7424c45099beb577f7a92%2F3-lectra-modaris-measures.png?alt=media" alt=""><figcaption><p>Extracted sections positioned at the bottom right of the workspace | <strong>Modaris V6</strong></p></figcaption></figure>

### Retrieve the section areas

* Open the **Measures sheet** and choose **Area** from the tool palette on the right.
* Set the grid to **Horizontal** and in the *Configure* menu choose **Net Area**.

<div align="center"><img src="https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-14fddc402f8c32cd4dab7acd49e9f939f1ae2468%2F5-lectra-modaris-config.png?alt=media" alt="Measures sheet - Configure | Modaris V6"></div>

* Click the extracted sections one at a time **starting from the leftmost one** so that they are added to the **Measures sheet** in the same order.

{% hint style="info" %}
On the Modaris workspace the extracted sections are positioned at the bottom right. For a correct export proceed from the first on the left moving rightward. This keeps the order required for importing in Pesipiuma.
{% endhint %}

<figure><img src="https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-229fd2117a4ef1f1ceb7424c45099beb577f7a92%2F3-lectra-modaris-measures.png?alt=media" alt=""><figcaption><p>Select the sections of the BACK piece starting from the first extracted one | <strong>Modaris V6</strong></p></figcaption></figure>

* After adding all sections to the Measures sheet you will get a table with the areas listed from the first section at the top. **This order allows correct import in Pesipiuma**. If the model is graded the sheet will also contain the measurements for all sizes.

![Areas of the BACK sections shown in the Measures sheet | Modaris V6](https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-d1ac447b9214f2437b798bf04ad6837df1470f7d%2F6-lectra-modaris-export.png?alt=media)

### Export the data

* Choose **Print/Export file** from the menu and select **Export Data File** (Modaris **V6** and **V7**) or **Text file** (Modaris **V8**) depending on the version in use.
* Select the destination on your computer and type the file name following these rules based on the *Modaris version*:
  1. **For Modaris V6 or V7:** the name must explicitly include the **.xls** extension
  2. **For later versions:** the name must explicitly include the **.csv** extension

{% hint style="success" %}
At this stage you can also manage the *quantity* of the pieces by adding the pound sign (**`#`**) to the .xls or .csv file name. For example, importing a file named **front#2.xls** will assign a quantity of **2** to the **front** piece.
{% endhint %}

{% hint style="info" %}
An Excel compatibility error may appear. Simply ignore it and continue saving the **.xls** or **.csv** file.
{% endhint %}

* Repeat these operations for all pieces to be padded, always **respecting the bottom-to-top extraction order**. When finished you will have as many **.xls** (or **.csv**) files as there are pieces.

### Examples

#### Example: Excel file exported from Modaris V6 in .xls format

In this example exported from Modaris V6 the first row for reading sizes is row `1`, so in [Workspace Preferences](https://help.pesipiuma.app/en/workspace-management/workspace-administration/workspace-preferences#pesipiuma-importers) check that the **Lectra-v6a** importer has **First Row** set to `1`.

![Example of Excel file resulting from exporting the BACK piece | Modaris V6](https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-3cbb6ca0eeccee74b4aede22318b2ad2cdfeb8ea%2F7-lectra-modaris-xls.png?alt=media)

#### Example: Excel view of the file exported from Modaris V8 in .csv format

In this example exported from Modaris V8 the first row for reading sizes is row 6, so in [Workspace Preferences](https://help.pesipiuma.app/en/workspace-management/workspace-administration/workspace-preferences#pesipiuma-importers) check that the **Lectra-v8a** importer has **First Row** set to `6`.

<figure><img src="https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-d8cb3d7bd14371cb8841742578f4952b7f4b6d82%2F8-lectra-modaris-v8.png?alt=media" alt=""><figcaption><p>Example of file resulting from exporting the BACK piece | <strong>Modaris V8</strong></p></figcaption></figure>

## 2. Import the data generated by Lectra Modaris into Pesipiuma

* Open the model's [Report Editor](https://help.pesipiuma.app/en/using-pesipiuma/introduction/report-editor).
* Click the **Import from Lectra-v6a** (or **Import from Lectra-v8a**) button in the left sidebar.

<figure><img src="https://1466117825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkPY8JSef9JxWbQFz10MA%2Fuploads%2Fgit-blob-815d245199d449ec912bca4f5704f05a7d2454a9%2F8-lectra-modaris-v6-import.png?alt=media" alt=""><figcaption><p>Lectra-v6 Data Importer window | <strong>Pesipiuma</strong></p></figcaption></figure>

* In the **Data Importer** window you can set a default coefficient and quantity for all imported pieces. If not specified, the default coefficient is 0 and the quantity is 1. Rounding defaults to the tenth of a gram.
* Click the **Select file** button to choose all the **.xls** (or **.csv**) files for the pieces exported from **Lectra Modaris**. Once selected, the list of pieces to be created will appear in the lower box.
* Finally click **Import** to complete the operation.

After processing the files the report editor will display the list of pieces with their sections created automatically. If the model was graded all sizes will also be created. At this point you can [edit](https://help.pesipiuma.app/en/preliminary-operations/manage-pieces#edit-a-piece) the quantities and coefficients if needed.

Optionally, for a [Graphic Report](https://help.pesipiuma.app/en/create-a-report#graphic-report), you can proceed to [upload the image](https://help.pesipiuma.app/en/using-pesipiuma/create-a-report/upload-an-image) and [position the labels](https://help.pesipiuma.app/en/using-pesipiuma/create-a-report/place-report-labels).

### Customize the Lectra importers

The Lectra importers support custom configuration of certain parameters. This allows the import operations to be adapted to the specific .xls or .csv files exported from Modaris. To proceed with customization see the section [Customize the Lectra importers](https://help.pesipiuma.app/en/workspace-management/workspace-administration/workspace-preferences#customize-lectra-importers).

{% content-ref url="../create-a-report/place-report-labels" %}
[place-report-labels](https://help.pesipiuma.app/en/using-pesipiuma/create-a-report/place-report-labels)
{% endcontent-ref %}

{% content-ref url="../create-a-report/upload-an-image" %}
[upload-an-image](https://help.pesipiuma.app/en/using-pesipiuma/create-a-report/upload-an-image)
{% endcontent-ref %}

{% content-ref url="../create-a-report" %}
[create-a-report](https://help.pesipiuma.app/en/using-pesipiuma/create-a-report)
{% endcontent-ref %}
