The object of the CENPyOlpWM_RuleInitOperator class is passed to the PostTechInitRules callback as a parameter.
It can be used to obtain the required operators within the scope of the PostTechInitRules callback in the %WORK_METHOD%.py script file, located in the folder of the plugin.
[Example]
def PostWmInitRules(wmRuleInitOperator):
|
|
Name of the rule. Kernel defined rule name may be used
|
|
|
Name of the event
|
|
|
Added event object
|
[Example]
eventObject = wmRuleInitOperator.AddPyEvent('RetractRule', 'LaserEvent')
eventObject.SetBool("IsLocked", True)
•
|
RemoveEventFromRule(ruleName: string, eventName: string)
|
|
|
Name of the rule. Kernel defined rule name may be used
|
|
|
Name of the event. Kernel defined event name may be used
|
[Example]
wmRuleInitOperator.RemoveEventFromRule('Approach', 'TwoPointApproach')
•
|
SetActivePyEvent(ruleName: string, eventName: string)
|
|
|
Name of the rule. Kernel and python defined rule name may be used
|
|
|
Name of the event. Kernel and python defined event name may be used
|
[Example]
wmRuleInitOperator.SetActivePyEvent('Retract', 'ChangeRecipeEvent')
[Example]
olpController = wmRuleInitOperator.GetController()
[Example]
logOperator = wmRuleInitOperator.GetLoggerOperator()
•
|
OverrideEventRuleInsertPosition(ruleName: string, insertPos: TPInsertPosition)
|
|
|
Name of the rule. Kernel defined rule name should be used
|
|
|
New insert position
|
Set the new insert position for the event rules with given name.
[Example]
wmRuleInitOperator.OverrideEventRuleInsertPosition("GlueOnRule", TPINSERTPOS_INSERTAFTER)
|