PostProcessOperationGroupAttributes
The callback PostProcessOperationGroupAttributes (CENPyOlpTech_POGAttribOperator) is called just before an operation group is computed.
Es kann verwendet werden, um:
-
Operation-Gruppen-Attributwerte abrufen
-
Operation-Gruppen-Attributwerte festlegen
-
auf CSV-Dateien zugreifen
-
Ausgabe in das Protokoll
The callback is defined in the %TechnologyName%.py file that is located in the scripts folder of the plugin.
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?