# Export Sepasoft MES Analysis Settings to another server

**URL:** <https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929>\
**Category:** 3rd Party Modules\
**Tags:** sepasoft\
**Created:** [October 7, 2024, 7:42pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929 "2024-10-07T19:42:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Calderon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Daniel\_Calderon](https://forum.inductiveautomation.com/u/Daniel_Calderon)\
**Post date:** [October 7, 2024, 7:42pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929/1 "2024-10-07T19:42:55Z")

</div>

Hi, Is it possible to export analysis settings configuration created through the impromptu Analysis selector to another database / gateway? (8.1.43 and 3.81.10 SP6)

---

<div class="post-metadata">

**Author:** ![jesse.records](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jesse.records/32/10960_2.png) [@jesse.records](https://forum.inductiveautomation.com/u/jesse.records)\
**Post date:** [October 7, 2024, 8:22pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929/2 "2024-10-07T20:22:40Z")

</div>

Hi @Daniel_Calderon ,

You should be able to export and import via the gateway Import/Export tool:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c402798c3b6cb38a4395d2094a6a7bd568a4e9b9.png)

Uncheck all and check Analysis settings.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/0/30a708e82c4239be0342088e8dfe84b99e7bb01b.png)A

Import the .changelog file to the next environment using the File Import tab.

---

<div class="post-metadata">

**Author:** ![Daniel\_Calderon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Daniel\_Calderon](https://forum.inductiveautomation.com/u/Daniel_Calderon)\
**Post date:** [October 7, 2024, 9:11pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929/3 "2024-10-07T21:11:32Z")

</div>

Thank you @jesse.records . Did not know that existed. I did it, but it sort of stayed "Building Export..." forever. Does it usually take a long time?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/f/9f73eab2f4b8a0851d560f2c83b90ba640d2bddd.png)

---

<div class="post-metadata">

**Author:** ![Daniel\_Calderon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Daniel\_Calderon](https://forum.inductiveautomation.com/u/Daniel_Calderon)\
**Post date:** [October 7, 2024, 9:27pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929/4 "2024-10-07T21:27:32Z")

</div>

Nevermind, it finally exported. Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Daniel\_Calderon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Daniel\_Calderon](https://forum.inductiveautomation.com/u/Daniel_Calderon)\
**Post date:** [January 24, 2025, 5:31pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929/5 "2025-01-24T17:31:30Z")

</div>

@jesse.records good morning,

I am having issues importing an exported file with only MES Analysis settings into another gateway where the equipment and enterprise are different.

I am getting

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c346e6cf466856b57d735718c771a4e18cde4fe6.png)

Is the import function restricted to restore settings on the same MES configuration as the source?

Thanks!

---

<div class="post-metadata">

**Author:** ![Daniel\_Calderon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Daniel\_Calderon](https://forum.inductiveautomation.com/u/Daniel_Calderon)\
**Post date:** [January 24, 2025, 6:04pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929/6 "2025-01-24T18:04:57Z")

</div>

I managed to export all my Analysis settings to an XML file using

```python
filter = system.mes.object.filter.createFilter()
filter.setMESObjectTypeName('AnalysisSettings')
xml = system.mes.exportMESObjects(filter)

```

but then I can't see a way to import them using scripts.

Any idea? thanks

---

<div class="post-metadata">

**Author:** ![jesse.records](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jesse.records/32/10960_2.png) [@jesse.records](https://forum.inductiveautomation.com/u/jesse.records)\
**Post date:** [January 27, 2025, 10:34pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929/7 "2025-01-27T22:34:53Z")

</div>

I think you found another way but I just ran through this example on my system:

On the export system:

```python
filter = system.mes.object.filter.createFilter()
filter.setMESObjectTypeName('AnalysisSettings')
xml =system.mes.exportMESObjects(filter)
filename = system.file.saveFile('analysisexport', 'xml', '')
system.file.writeFile(filename, xml)

```

On the import system:

```python
filename = 'analysisexport.xml'
xml = system.file.readFileAsString('C:\\my\\file\\path\\'+filename)
objects = system.mes.importMESObjects(xml)
system.mes.saveMESObjects(objects)

```

---

<div class="post-metadata">

**Author:** ![Daniel\_Calderon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Daniel\_Calderon](https://forum.inductiveautomation.com/u/Daniel_Calderon)\
**Post date:** [January 28, 2025, 9:22pm UTC](https://forum.inductiveautomation.com/t/export-sepasoft-mes-analysis-settings-to-another-server/96929/8 "2025-01-28T21:22:59Z")

</div>

SOLVED.

Thanks Jesse, I had written gateway scripts to dump the analysis configurations to a JSON file and then to read the file and programmatically create and save them in the destination server.

This XML method also works.

Best regards.
