Skip to Content
Python APIRappelsIOlpTechnologyPostProcessOpérationGroupAttributs

PostProcessOpérationGroupAttributs

The callback PostProcessOperationGroupAttributes (CENPyOlpTech_POGAttribOperator) is called just before an operation group is computed.

Il peut être utilisé pour :

  • obtenir les valeurs d’attribut du groupe d’opérations

  • Set les valeurs des attributs du groupe d’opérations

  • Accéder aux fichiers CSV

  • sortie au journal

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?