system.mes.analysis.saveMESAnalysisSettings

Sepasoft MES Module Suite

system.mes.analysis.saveMESAnalysisSettings(settings)

Save the analysis settings to storage.

Syntax

system.mes.analysis.saveMESAnalysisSettings(settings)

  • Parameters

MESAnalysisSettings settings - A MESAnalysisSettings object containing the data points, filter expressions, group by, order by, etc. to save.

  • Returns

None

  • Scope

All

Python
#Save the settings after creating an analysis settings 
settings = system.mes.analysis.createMESAnalysisSettings('Analysis')
system.mes.analysis.saveMESAnalysisSettings(settings

Syntax

system.mes.analysis.saveMESAnalysisSettings(settings, user)


  • Parameters

MESAnalysisSettings settings - A MESAnalysisSettings object containing the data points, filter expressions, group by, order by, etc. to save.

PyUser user - User object obtained by calling system.user.getUser(). This is optional and only available if calling this script from a Gateway Context, such as when doing analysis in a tag change event script or similar. If a user is passed in, their security settings will be used. If a user is not passed in and the script is executing from a Gateway Event script, analysis security settings will not be applied.

  • Returns

None

  • Scope

All

Code
#Save the settings after creating an analysis settings 
user = system.user.getUser('UserSource', 'UserName')
settings = system.mes.analysis.createMESAnalysisSettings('Analysis', user)
system.mes.analysis.saveMESAnalysisSettings(settings, user) 

Sepasoft MES Module Suite