Skip to Content
FASTSUITE E2API ReferencePython APIWorkflowsWork Method Scripts

Work Method Scripts

A work method script is a Python file named after the work method (e.g., ArcWeldWM.py). It lives in the work method scripts folder inside the plugin.

When the kernel processes a work method, it calls these callbacks in order:

Callback Chain

Callback → Operator Class Reference

CallbackOperator classPurpose
PostWmInitAttributesCENPyOlpWM_AttribInitOperatorCreate/read/write work method attributes
PostWmInitEventsCENPyOlpWM_EventInitOperatorRegister work method events
PostWmInitRulesCENPyOlpWM_RuleInitOperatorRegister work method rules
PostWmSyncPgAttributesCENPyOlpWM_SyncPgAttribOperatorSynchronize process geometry attributes
PostProcessOperationAttributesCENPyOlpWM_POAttribOperatorRead/write per-operation attributes
PostWmOnAttribChangedCENPyOlpWM_AttribChangedOperatorReacts to attribute changes
PostWmOnFrameChangedCENPyOlpFrameChangedOperatorReacts to frame changes

Typical Pattern

def PostWmInitAttributes(wmAttribInitOperator): creator = wmAttribInitOperator.GetAttribCreator() creator.AddDouble('Offset', 0.0, -50, 50, 0.1, USER_ATTRIBUTE | OPERATION_ATTRIBUTE, ATTRIB_LENGTH, 'Offset') def PostProcessOperationAttributes(wmPOAttribOperator): getter = wmPOAttribOperator.GetAttribGetter() offset = getter.GetDouble('Offset') logOp = wmPOAttribOperator.GetLoggerOperator() logOp.LogInfo(f'Processing operation with offset {offset}')
Was this page helpful?