Python scripting - Technology operators

CENPyOlpTech_RuleInitOperator

 

The object of CENPyOlpTech_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 %TechnologyName%.py script file, located in the folder of the plugin.

[Example]

 

def PostTechInitRules(trio):

   pass

 

 

Methods

 

AddPyEvent(ruleName: string, pyEventName: string): CENPyOlpEventObject

 

o

ruleName

Name of the rule. Kernel defined rule name may be used

 

o

pyEventame

Name of the event

 

o

return

Added event object

 

[Example]

   eventObject = trio.AddPyEvent('RetractRule', 'pyLaserEvent')

   eventObject.SetBool("IsLocked", True)

 

 


 

RemoveEventFromRule(ruleName: string, eventName: string)

 

o

ruleName

Name of the rule. Kernel defined rule name may be used

 

o

eventame

Name of the event.  Kernel defined event name may be used

 

[Example]

   trio.RemoveEventFromRule('Approach', 'TwoPointApproach')

 

 


 

SetActivePyEvent(ruleName: string, eventName: string)

 

o

ruleName

Name of the rule. Kernel defined rule name may be used.

 

o

eventName

Name of the event.  Kernel defined event name may be used

 

[Example]

   trio.SetActivePyEvent('Retract', 'ChangeRecipeEvent')

 

 


 

GetController(): CENPyOlpController

 

o

return

Object of CENPyOlpController class

 

[Example]

   controller = trio.GetController()

 

 


 

GetLoggerOperator(): CENPyOlpLogOperator

 

o

return

Object of CENPyOlpLogOperator class

 

[Example]

   logOperator = trio.GetLoggerOperator()

 

 


 

OverrideEventRuleInsertPosition(ruleName: string, insertPos: TPInsertPosition)

 

o

ruleName

Name of the rule. Kernel defined rule name should be used

 

o

insertPos

New insert position

 

Set the new insert position for the event rules with given name.

 

[Example]

   trio.OverrideEventRuleInsertPosition("CustomRule", TPINSERTPOS_INSERTAFTER)

 

 


 

 



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