Python scripting - Event operators

CENPyOlpEventOperator

 

The object of the CENPyOlpEventOperator class may be obtained with CENPyOlpEvent_EventComputeOperator.

 

[Example]

def PostCompute(eco):

   eventOperator = eco.GetEventOperator()

 

 

Methods

 

AddEvent(UuId: string, pTpElement: CENPyOlpTpElement, iInsertPosition: TPInsertPosition): CENPyOlpEventObject

 

o

UuId

unique id of the event to be added

 

o

pTpElement

reference toolpath element

 

o

iInsertPosition

before or after the reference toolpath element

 

o

return

The Event object added

 

Add Technology Event on input toolpath element or at the end of the toolpath segment

 

[Example]

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   eventOperator.AddEvent("69B94E6B-03D7-48FF-A62A-BE9CE3C142C8", myTpElement, TPINSERTPOS_INSERTAFTER)

 


 

AddEventBoolActor(target: CENPyOlpTpElement, actor: CENPyOlpActor, iInsertPosition: TPInsertPosition): CENPyOlpBoolActorEvent

 

o

target

target toolpath element

 

o

actor

input Actor for the event

 

o

iInsertPosition

before or after the reference toolpath element

 

o

return

The Event object of type CENPyOlpBoolActorEvent

 

Add Actor Event on target toolpath element.

 

[Example]

      boolActor = eventOperator.AddEventBoolActor(myTpElement, actor, TPINSERTPOS_INSERTAFTER)

      boolActor.SetValue(True)

 


 

AddEventFloatArrayActor(target: CENPyOlpTpElement, actor: CENPyOlpActor, iInsertPosition: TPInsertPosition): CENPyOlpFloatArrayActorEvent

 

o

target

target toolpath element

 

o

actor

input Actor for the event

 

o

iInsertPosition

before or after the reference toolpath element

 

o

return

The Event object of type CENPyOlpFloatArrayActorEvent

 

Add Actor Event on target toolpath element.

 

[Example]

      floatArrayActor = eventOperator.AddEventFloatArrayActor(myTpElement, actor, TPINSERTPOS_INSERTAFTER)

 


 

AddEventWaitForBoolSensor(target: CENPyOlpTpElement, sensor: CENPyOlpSensor, iInsertPosition: TPInsertPosition): CENPyOlpWaitForBoolSensorEvent

 

o

target

target toolpath element

 

o

sensor

input Sensor for the event

 

o

iInsertPosition

before or after the reference toolpath element

 

o

return

The Event object of type CENPyOlpWaitForBoolSensorEvent

 

Add Sensor Event on target toolpath element.

 

[Example]

   boolSensor = eventOperator.AddSensorEvent(myTpElement, sensors[0], TPINSERTPOS_INSERTAFTER)

   boolSensor.SetValue(True)

 


 

AddEventSetBoolSignal(value : bool, target: CENPyOlpTpElement, signalNumber : int, iInsertPosition: TPInsertPosition): CENPyOlpSetBoolSignalEvent

 

o

value

value to initialize event with

 

o

target

target toolpath element

 

o

signalNumber

the number of the signal

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The CENPyOlpSetBoolSignalEvent object added

 

 

Adds a set bool signal event to the toolpath element for a controller signal connection.

The connection is chosen to be the first one which has a "out" signal with the given number.

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   myBoolSignalEvent = eventOperator.AddEventSetBoolSignal(True, myTpElement, 8, TPINSERTPOS_INSERTBEFORE)

 


 

AddEventSetFloatSignal(value : float, target: CENPyOlpTpElement, signalNumber : int, iInsertPosition: TPInsertPosition): CENPyOlpSetFloatSignalEvent

 

o

value

value to initialize event with

 

o

target

target toolpath element

 

o

signalNumber

the number of the signal

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The CENPyOlpSetFloatSignalEvent object added

 

Adds a set float signal event to the toolpath element for a controller signal connection.

The connection is chosen to be the first one which has a "out" signal with the given number.

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   myFloatSignalEvent = eventOperator.AddEventSetBoolSignal(5.7, myTpElement, 7, TPINSERTPOS_INSERTBEFORE)

 


 

AddEventSetIntSignal(value : int, target: CENPyOlpTpElement, signalNumber : int, iInsertPosition: TPInsertPosition): CENPyOlpSetIntSignalEvent

 

o

value

value to initialize event with

 

o

target

target toolpath element

 

o

signalNumber

the number of the signal

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The CENPyOlpSetIntSignalEvent object added

 

Adds a set integer signal event to the toolpath element for a controller signal connection.

The connection is chosen to be the first one which has a "out" signal with the given number.

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   myIntSignalEvent = eventOperator.AddEventSetIntSignal(50, myTpElement, 6, TPINSERTPOS_INSERTBEFORE)

 


 

AddEventWaitForBoolSignal(value : bool, target: CENPyOlpTpElement, signalNumber : int, iInsertPosition: TPInsertPosition): CENPyOlpWaitForBoolSignalEvent

 

o

value

value to initialize event with

 

o

target

target toolpath element

 

o

signalNumber

the number of the signal

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The CENPyOlpWaitForBoolSignalEvent object added

 

Add a wait for bool signal event to the toolpath element for a controller signal connection.

The connection is chosen to be the first one which has a "in" signal with the given number.

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   myBoolSignalEvent = eventOperator.AddEventWaitForBoolSignal(True, myTpElement, 8, TPINSERTPOS_INSERTBEFORE)

 


 

AddEventWaitForFloatSignal(value : float, target: CENPyOlpTpElement, signalNumber : int, iInsertPosition: TPInsertPosition): CENPyOlpWaitForFloatSignalEvent

 

o

value

value to initialize event with

 

o

target

target toolpath element

 

o

signalNumber

the number of the signal

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The CENPyOlpWaitForFloatSignalEvent object added

 

Add a wait for float signal event to the toolpath element for a controller signal connection.

The connection is chosen to be the first one which has a "in" signal with the given number.

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   myFloatSignalEvent = eventOperator.AddEventWaitForFloatSignal(5.7, myTpElement, 7, TPINSERTPOS_INSERTBEFORE)

 


 

AddEventWaitForIntSignal(value : int, target: CENPyOlpTpElement, signalNumber : int, iInsertPosition: TPInsertPosition): CENPyOlpWaitForIntSignalEvent

 

o

value

value to initialize event with

 

o

target

target toolpath element

 

o

signalNumber

the number of the signal

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The CENPyOlpWaitForIntSignalEvent object added

 

Add a wait for integer signal event to the toolpath element for a controller signal connection.

The connection is chosen to be the first one which has a "in" signal with the given number.

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   myIntSignalEvent = eventOperator.AddEventWaitForIntSignal(50, myTpElement, 6, TPINSERTPOS_INSERTBEFORE)

 


 

AddSpeed(target: CENPyOlpTpElement, iInsertPosition: TPInsertPosition): CENPyOlpSpeedEvent

 

o

target

target toolpath element

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The Event object added

 

Adds a Speed event to target toolpath element

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   se = eventOperator.AddSpeed(myTpElement, TPINSERTPOS_INSERTBEFORE)

 


 

AddToolEvent(target: CENPyOlpTpElement, iInsertPosition: TPInsertPosition): CENPyOlpToolEvent

 

o

target

target toolpath element

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The Event object added

 

Adds a Tool event to target toolpath element

 

[Example]

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   te = eventOperator.AddToolEvent(myTpElement, TPINSERTPOS_INSERTBEFORE)

 


 

AddAccuracyEvent(target: CENPyOlpTpElement, iInsertPosition: TPInsertPosition): CENPyOlpAccuracyEvent

 

o

target

target toolpath element

 

o

iInsertPosition

before or after the reference toolpath element

 

o

return

The Event object added

 

Adds an Accuracy event to target toolpath element.

 

[Example]

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   ae = eventOperator.AddAccuracyEvent(myTpElement, TPINSERTPOS_INSERTBEFORE)

 


 

AddDwellEvent(target: CENPyOlpTpElement, iInsertPosition: TPInsertPosition): CENPyOlpDwellEvent

 

o

target

target toolpath element

 

o

iInsertPosition

before or after the reference toolpath element

 

o

return

The Event object added

 

Add a dwell event to the target element.

 

[Example]

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   de = eventOperator.AddDwellEvent(myTpElement, TPINSERTPOS_INSERTBEFORE)

 


 

AddAccelerationEvent(target: CENPyOlpTpElement, iInsertPosition: TPInsertPosition): CENPyOlpAccelerationEvent

 

o

target

target toolpath element

 

o

iInsertPosition

before or after the reference toolpath element

 

o

return

The Acceleration Event object added

 

Adds an Acceleration event to target toolpath element.

 

[Example]

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   ae = eventOperator.AddAccelerationEvent(myTpElement, TPINSERTPOS_INSERTBEFORE)

 


 

AddSetResourcePortEvent(target: CENPyOlpTpElement, iInsertPosition: TPInsertPosition): CENPyOlpSetResourcePortEvent

 

o

target

target toolpath element

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The CENPyOlpSetResourcePortEvent object added

 

Adds a set resource port event to the toolpath element.

The event requires a resource and can then set values for input ports of that resource.

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   mySetResourcePortEvent = eventOperator.AddSetResourcePortEvent(myTpElement, TPINSERTPOS_INSERTBEFORE)

 


 

AddWaitForResourcePortEvent(target: CENPyOlpTpElement, iInsertPosition: TPInsertPosition): CENPyOlpWaitForResourcePortEvent

 

o

target

target toolpath element

 

o

iInsertPosition

before or after the reference toolpath element.

 

o

return

The CENPyOlpWaitForResourcePortEvent object added

 

Adds a wait for resource port event to the toolpath element.

The event requires a resource and can then wait for values on output ports of that resource.

 

[Example]   

   myTpElement = eco.GetRefTpElement()

   eventOperator = eco.GetEventOperator()

   myWaitForResourcePortEvent = eventOperator.AddWaitForResourcePortEvent(myTpElement, TPINSERTPOS_INSERTBEFORE)

 


 



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