Skip to Content
Python APIRappelsIOlpWorkMethodPostWmSyncPgAttributes

PostWmSyncPgAttributes

The callback PostWmSyncPgAttributes (CENPyOlpWM_SyncPgAttribOperator) will be called only when an operation is computed but not when it is recomputed.

Il peut être utilisé pour :

  • obtenir des valeurs d’attribut

  • Définir les valeurs des attributs

  • obtenir les valeurs d’attribut des événements

  • Valeurs d’attributs d’ensemble des événements

  • access ProcessGeometryOperator

  • sortie au journal

The callback is defined in the %WORKMETHOD_NAME%.py file that is located in the scripts folder of the plugin.

def PostWmSyncPgAttributes(operator): attribGetter = operator.GetAttribGetter() attribSetter = operator.GetAttribSetter() processGeometryOperator = operator.GetCurrentProcessGeometryOperator() geometryName = processGeometryOperator.GetProcessGeometryName() isRegshape = processGeometryOperator.IsRegshape() matrix = processGeometryOperator.GetRegshapeCenter() regshapeLength = processGeometryOperator.GetRegshapeLength() regshapeHeight = processGeometryOperator.GetRegshapeHeight() regshapeRadius = processGeometryOperator.GetRegshapeRadius() regshapeCornerRadius = processGeometryOperator.GetRegshapeCornerRadius() geoType = processGeometryOperator.GetGeoType() regshapeType = processGeometryOperator.GetRegshapeType() if regshapeType == REGSHAPE_CIRCLE: circleEventAttribGetter = operator.GetEventAttribGetter('CIRCLE') circleEventAttribSetter = operator.GetEventAttribSetter('CIRCLE') circRad = circleEventAttribGetter.GetDouble('Radius') logger = operator.GetLoggerOperator() logger.LogDebug('PostWmSyncPgAttributes OK.')
Was this page helpful?