Python scripting - Workmethod callbacks

PostWmInitRules

 

The callback PostWmInitRules(CENPyOlpWM_RuleInitOperator) is called just after the kernel initializes the workmethod event rules.

 

It can be used to:

- initialize workmethod event rules

- access OlpController

- output to the log

 

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

 

PostWmInitRules

 

[Example]

 

def PostTechInitAttributes(techAttribInitOperator):

 

def PostWmInitRules(wmRuleInitOperator):

   wmRuleInitOperator.AddPyEvent('myRetractRule', 'ZAxisEvent')

   wmRuleInitOperator.AddPyEvent('myRetractRule', 'GasEvent')

 


PostWmInitRules_Ex

 


Previous
Page précédente
Chapter
Page principale du chapitre
Next
Page suivante