PostProcessGroupAttributsOpérationGroupT
Le rappel
PostProcessOperationGroupAttributes(
CENPyOlpTech_POGAttribOperator
) est appelé juste avant qu’un groupe d’opérations ne soit calculé.
Il peut être utilisé pour :
-
obtenir les valeurs d’attributs du groupe d’opérations
-
définir les valeurs des attributs du groupe d’opérations
-
accéder aux fichiers CSV
-
sortie vers le journal
Le rappel est défini dans le
%TechnologyName%.py
qui se trouve dans le dossier scripts du
.
def PostProcessOperationGroupAttributes(poga):
# Get values from attributes
attribGetter = poga.GetAttribGetter()
valOfMyIntAttrib = attribGetter.GetInteger('MyIntAttribute')
valOfMyDoubleAttrib = attribGetter.GetDouble('MyDoubleAttribute')
valOfMyStrAttrib = attribGetter.GetString('MyStringAttribute')
valOfMyBoolAttrib = attribGetter.GetBool('MyBoolAttribute')
indexOfMyEnumAttrib = attribGetter.GetEnumIndex('MyEnumAttribute')
# Set values to the attributes
attribSetter = poga.GetAttribSetter()
attribSetter.SetInteger('MyIntAttribute', 15)
attribSetter.SetDouble('MyDoubleAttribute', 15.8)
attribSetter.SetString('MyStringAttribute', 'This is new string')
attribSetter.SetBool('MyBoolAttribute', False)
attribSetter.SetEnumIndex('MyEnumAttribute', 4)
# Output attribute value to the log
logOperator = techAttribInitOperator.GetLoggerOperator()
logOperator.LogDebug('indexOfMyEnumAttrib = ' + str(indexOfMyEnumAttrib))Was this page helpful?