---
title: "system.mes.spc.analysis.saveStoredSPC(name, settings, overwrite)"
id: "system-mes-spc-analysis-savestoredspc-name-settings-overwrite"
project: "MES User Manual"
url: "https://docs.sepasoft.com/articles/user-manual/system-mes-spc-analysis-savestoredspc-name-settings-overwrite"
updated: 2026-07-31T14:58:15Z
---

# system\.mes\.spc\.analysis\.saveStoredSPC\(name, settings, overwrite\)

**Sepasoft MES Module Suite**

### system.mes.spc.analysis.saveStoredSPC(name, settings, overwrite)

Save the SPC settings for specified saved SPC settings name.

| ![Warning](/resources/Storage/user-manual/user-manual/Warning.png) | **Scripting Function modifications in**<br><br>MES 3.79.3 RC 5 and later<br>MES 3.81.4 RC 5 and later<br><br>For version downloads, go to [https://www.sepasoft.com/downloads/](https://www.sepasoft.com/downloads/). |
| --- | --- |

Syntax

system.mes.spc.analysis.saveStoredSPC(**name, settings, overwrite**)

* Parameters

String **name** - The name of the stored SPC settings to save.

[SPCSettings](/articles/user-manual/spc-settings)**settings** - An instance of a SPCSettings object. Use the system.mes.spc.analysis.createSettings script function to create the SPCSettings object.

Boolean **overwrite** - If true and the stored SPC settings already exist, save the new settings over the existing settings.

* Returns

Nothing

* Scope

All

Code Example

```python
locationPath = 'Enterprise\El Dorado Hills\Packaging Area\Packaging Line 1\Inspection Station 1'

startDate = system.mes.spc.analysis.formatDate(system.date.addHours(system.date.now(), -1))
endDate = system.mes.spc.analysis.formatDate(system.date.now())

definitionName = 'Case Inspection'
attribute = 'Fill Level'

controlLimits = 'CpPpLSL,CpPpUSL'
signals = ''
dataFormatName = 'Process Capability and Performance'
filters=''

spcsettings = system.mes.spc.analysis.createSettings(definitionName, attribute, filters, controlLimits, signals, dataFormatName)
filter = spcsettings.encodeList(['FromDate='+startDate,'ToDate='+endDate,'Location='+locationPath])
spcsettings.setFilters(filter)

system.mes.spc.analysis.saveStoredSPC('My Case Inspection Analysis', spcsettings, True)


```


**Sepasoft MES Module Suite**