system.mes.changelog.getChangeEvents(filter)

Sepasoft MES Module Suite

getChangeEvents(filter)

Returns the same history as a list of change-event objects. Use this in a Gateway script when you need to read each event in Python. Available in Gateway scope.

Syntax

Python
system.mes.changelog.getChangeEvents(filter)

Parameters

ParameterTypeRequiredDescription
filter
MESChangelogFilter
Required
The filter from createFilter().

Returns

TypeDescription
List
Change-event objects. The list is empty when nothing matches.

On each event:

MethodReturns
getVersionTimeStamp()
Date of the change
getMESObjectName()
Current object name
getHistoricalName()
The object's name at the time of the change when showHistoricalNames(True) was called. When that setting is left at False, this returns the current name. MES 3.81.13 SP3 and MES 4.83.3 SP3 and later.
getMESObjectUUID()
Object UUID
getType()
Change event type
getPath()
Stored property path
getOldValue()
Value before the change
getNewValue()
Value after the change
getChangedAtLocationPath()
Gateway location
getChangedByPersonName()
Person name
getDisplayPath()
In MES 3.81.12 SP0, MES 4.83.1 SP0, and later, the property path with the parameter UUID replaced by the current parameter name. getPath() still returns the stored path. If the parameter record is gone, this matches getPath().
getChangeNote()
Change note

Display path

In MES 3.81.12 SP0, MES 4.83.1 SP0, and later, getDisplayPath() replaces only the identifier segment. The rest of the path stays the stored property name. The name is the parameter’s current friendly name, so a later rename changes how older events read.

Path starts withIdentifier segment becomes
BatchFormulaParameter
Formula parameter friendly name
BatchMasterParameters
Master recipe parameter friendly name
BatchControlParameters
Control recipe parameter friendly name
BatchPhaseParameters
Phase parameter friendly name
SampleLocation
Equipment path
BatchMasterLogicPhaseVersions
Phase name

Any other path is unchanged.

getPath() BatchFormulaParameter.f099a794-caca-428a-86cf-d20e86da9ace.ParamValue
getDisplayPath() BatchFormulaParameter.Target Weight.ParamValue

setChangePaths() and setChangePathsLike() match the stored path returned by getPath().

system.mes.changelog.getChangelogData() returns a dataset. Its Property Path column is the stored path from getPath().

Example Code

Python
changelogFilter = system.mes.changelog.createFilter()
changelogFilter.setMESObjectUUIDs("adc792ed-fce1-4fb2-80ae-fb249fc43b37")
changelogFilter.showHistoricalNames(True)
events = system.mes.changelog.getChangeEvents(filter=changelogFilter)
for event in events:
    print event.getVersionTimeStamp(), event.getHistoricalName(), event.getPath(), event.getDisplayPath(), event.getOldValue(), event.getNewValue()

Sepasoft MES Module Suite