Python scripting - Technology callbacks

PostTechInitRules

Previous  Chapter  Next

 

The callback PostTechInitRules(CENPyOlpTech_RuleInitOperator) is called just after the kernel initializes the technology event rules.

 

It can be used to:

- initialize technology event rules

- output to the log

 

In order to add an event to the rule it should be registered in PostTechInitEvents callback.

 

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

 

PostTechInitRules

 

[Example]

 

def PostTechInitRules(trio):

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

   trio.AddPyEvent('myRetractRule', 'LaserEvent')

 

[Example]

File: Samples\JenoptikPluginUpdated\Plugin\TechnologyPackages\LaserCuttingTechnology\Jenoptik\JO_RETRACT_RULE.py

 

from centypes import *

 

def GetRuleProcessType():

   return EVENTPROCESS_RETRACT

   

def GetInsertPosition():

   return TPINSERTPOS_INSERTAFTER

   

def GetActiveEvent():

   return 0

   

def GetVisibility():

   return True

 


PostTechInitRules_Ex

 


Previous
Previous page
Chapter
Chapter page
Next
Next page