system.mes.analysis.executeAnalysis

Sepasoft MES Module Suite

system.mes.analysis.executeAnalysis

These script functions are used to execute the analysis specified in the parameters.



system.mes.analysis.executeAnalysis(beginDate, endDate, settings)

Execute and returns the results for the analysis specified in the parameters.

Syntax

system.mes.analysis.executeAnalysis(beginDate, endDate, settings)

Parameters

Date beginDate - Date object containing the beginning date to based the analysis results on.

Date endDate - Date object containing the ending date to based the analysis results on.

MESAnalysisSettings settings - MESAnalysisSettings object containing the data points, filter expressions, group by, order by, etc. setting to return the results for.

Returns

MESAnalysisResults - A MESAnalysisResults object containing the results of the analysis that was returned.

Scope

All

Python
##Execute the "Downtime" Analysis Settings and print the dataset object.
sasName = 'Downtime'
obj = system.mes.analysis.getMESAnalysisSettings(sasName)
end = system.date.now()
start = system.date.addDays(end, -2)
result = system.mes.analysis.executeAnalysis(start, end, obj)
print result.getDataset()

Output

Python
Dataset [5R x 12C] 

system.mes.analysis.executeAnalysis(beginDate, endDate, settings, user)

Execute and returns the results for the analysis specified in the parameters.

Syntax

system.mes.analysis.executeAnalysis(beginDate, endDate, settings, user)

Parameters

Date beginDate - Date object containing the beginning date to based the analysis results on.

Date endDate - Date object containing the ending date to based the analysis results on.

MESAnalysisSettings settings - MESAnalysisSettings object containing the data points, filter expressions, group by, order by, etc. setting to return the results for.

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

MESAnalysisResults - A MESAnalysisResults object containing the results of the analysis that was returned. (See MESAnalysisResults in the manual for more details.)

Scope

All

Python
##Execute the "Downtime" Analysis Settings and print the dataset object.
sasName = 'Downtime'
obj = system.mes.analysis.getMESAnalysisSettings(sasName)
end = system.date.now()
start = system.date.addDays(end, -2)
user = system.user.getUser('UserSource', 'UserName')
result = system.mes.analysis.executeAnalysis(start, end, obj, user)
print result.getDataset()

Output
Python
Dataset [5R x 12C] 

system.mes.analysis.executeAnalysis(beginDate, endDate, settings, parameters)

Execute and returns the results for the analysis specified in the parameters.

Syntax

system.mes.analysis.executeAnalysis(beginDate, endDate, settings, parameters)

Parameters

Date beginDate - Date object containing the beginning date to based the analysis results on.

Date endDate - Date object containing the ending date to based the analysis results on.

MESAnalysisSettings settings - MESAnalysisSettings object containing the data points, filter expressions, group by, order by, etc. setting to return the results for.

PyDictionary parameters - A PyDictionary containing name / value pairs for each parameter that exists in the analysis settings.

Returns

MESAnalysisResults - A MESAnalysisResults object containing the results of the analysis that was returned.

Scope

All

Python
##Execute the "Downtime" Analysis Settings and print the dataset object.
sasName = 'Downtime'
obj = system.mes.analysis.getMESAnalysisSettings(sasName)
end = system.date.now()
start = system.date.addDays(end, -2)
eqPath = '[global]\Dressings Inc\California\Raw Materials\Unload Station 1'
params = {'EqPath' : eqPath, 'PackageCount' : 1.0}
result = system.mes.analysis.executeAnalysis(start, end, obj, params)
print result.getDataset()

Output

Python
Dataset [3R x 12C]

system.mes.analysis.executeAnalysis(beginDate, endDate, settings, parameters, user)

Execute and returns the results for the analysis specified in the parameters.

Syntax

system.mes.analysis.executeAnalysis(beginDate, endDate, settings, parameters)

Parameters

Date beginDate - Date object containing the beginning date to based the analysis results on.

Date endDate - Date object containing the ending date to based the analysis results on.

MESAnalysisSettings settings - MESAnalysisSettings object containing the data points, filter expressions, group by, order by, etc. setting to return the results for.

PyDictionary parameters - A PyDictionary containing name / value pairs for each parameter that exists in the analysis settings.

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

MESAnalysisResults - A MESAnalysisResults object containing the results of the analysis that was returned.

Scope

All

Python
##Execute the "Downtime" Analysis Settings and print the dataset object.
sasName = 'Downtime'
obj = system.mes.analysis.getMESAnalysisSettings(sasName)
end = system.date.now()
start = system.date.addDays(end, -2)
eqPath = '[global]\Dressings Inc\California\Raw Materials\Unload Station 1'
params = {'EqPath' : eqPath, 'PackageCount' : 1.0}
user = system.user.getUser('UserSource', 'UserName')
result = system.mes.analysis.executeAnalysis(start, end, obj, params, user)
print result.getDataset()

Output

Python
Dataset [3R x 12C]

system.mes.analysis.executeAnalysis(beginDate, endDate, savedSettingsName)

Execute and returns the results for the analysis specified in the parameters.

Syntax

system.mes.analysis.executeAnalysis(beginDate, endDate, savedSettingsName)

Parameters

Date beginDate - Date object containing the beginning date to based the analysis results on.

Date endDate - Date object containing the ending date to based the analysis results on.

String savedSettingsName - The name of the saved analysis settings to execute and return the results for. 

Returns

MESAnalysisResults - A MESAnalysisResults object containing the results of the analysis that was returned.

Scope

All

Python
##Execute the "Downtime" Analysis Settings and print the dataset object.
sasName = 'Downtime'
obj = system.mes.analysis.getMESAnalysisSettings(sasName)
end = system.date.now()
start = system.date.addDays(end, -2)
result = system.mes.analysis.executeAnalysis(start, end, sasName)
print result.getDataset() 

Output

Python
Dataset [5R x 12C]  

system.mes.analysis.executeAnalysis(beginDate, endDate, savedSettingsName, user)

Execute and returns the results for the analysis specified in the parameters.

Syntax

system.mes.analysis.executeAnalysis(beginDate, endDate, savedSettingsName, user)

Parameters

Date beginDate - Date object containing the beginning date to based the analysis results on.

Date endDate - Date object containing the ending date to based the analysis results on.

String savedSettingsName - The name of the saved analysis settings to execute and return the results for. 

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

MESAnalysisResults - A MESAnalysisResults object containing the results of the analysis that was returned.

Scope

All

Python
##Execute the "Downtime" Analysis Settings and print the dataset object.
sasName = 'Downtime'
obj = system.mes.analysis.getMESAnalysisSettings(sasName)
end = system.date.now()
start = system.date.addDays(end, -2)
user = system.user.getUser('UserSource', 'UserName')
result = system.mes.analysis.executeAnalysis(start, end, sasName, user)
print result.getDataset() 

Output

Python
Dataset [5R x 12C]

system.mes.analysis.executeAnalysis(beginDate, endDate, savedSettingsName, parameters)

Execute and returns the results for the analysis specified in the parameters.

Syntax

system.mes.analysis.executeAnalysis(beginDate, endDate, savedSettingsName, parameters)

Parameters

Date beginDate - Date object containing the beginning date to based the analysis results on.

Date endDate - Date object containing the ending date to based the analysis results on.

String savedSettingsName - The name of the saved analysis settings to execute and return the results for. 

PyDictionary parameters - A PyDictionary containing name / value pairs for each parameter that exists in the analysis settings.

Returns

MESAnalysisResults - A MESAnalysisResults object containing the results of the analysis that was returned.

Scope

All


Python
##Execute the "Downtime" Analysis Settings and print the dataset object.
sasName = 'Downtime'
obj = system.mes.analysis.getMESAnalysisSettings(sasName)
end = system.date.now()
start = system.date.addDays(end, -2)
eqPath = '[global]\Dressings Inc\California\Raw Materials\Unload Station 1'
params = {'EqPath' : eqPath, 'PackageCount' : 1.0}
result = system.mes.analysis.executeAnalysis(start, end, sasName, params)
print result.getDataset()

Output

Python
Dataset [3R x 12C]  

system.mes.analysis.executeAnalysis(beginDate, endDate, savedSettingsName, parameters, user)

Execute and returns the results for the analysis specified in the parameters.

Syntax

system.mes.analysis.executeAnalysis(beginDate, endDate, savedSettingsName, parameters)

Parameters

Date beginDate - Date object containing the beginning date to based the analysis results on.

Date endDate - Date object containing the ending date to based the analysis results on.

String savedSettingsName - The name of the saved analysis settings to execute and return the results for. 

PyDictionary parameters - A PyDictionary containing name / value pairs for each parameter that exists in the analysis settings.

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

MESAnalysisResults - A MESAnalysisResults object containing the results of the analysis that was returned.

Scope

All

Python
##Execute the "Downtime" Analysis Settings and print the dataset object.
sasName = 'Downtime'
obj = system.mes.analysis.getMESAnalysisSettings(sasName)
end = system.date.now()
start = system.date.addDays(end, -2)
eqPath = '[global]\Dressings Inc\California\Raw Materials\Unload Station 1'
params = {'EqPath' : eqPath, 'PackageCount' : 1.0}
user = system.user.getUser('UserSource', 'UserName')
result = system.mes.analysis.executeAnalysis(start, end, sasName, params, user)
print result.getDataset()

Output

Python
Dataset [3R x 12C]





Sepasoft MES Module Suite