Python scripting - Event operators

CENPyOlpEvent_PEOperator

 

The object of the CENPyOlpEvent_PEOperator class is passed to the PostProcessAttributes callback as a parameter.

It can be used to obtain the required operators within the scope of the PostProcessAttributes callback in the %EVENT_NAME%.py script file, located in the folder of the plugin.

 

[Example]

 

def PostProcessAttributes(eventPeOperator):

   pass

 

 

Methods

 

GetAttribGetter(): CENPyOlpAttribGetter

 

o

return

Object of CENPyOlpAttribGetter class

 

[Example]

   attribGetter = eventPeOperator.GetAttribGetter()

 


 

GetAttribSetter(): CENPyOlpAttribSetter

 

o

return

Object of CENPyOlpAttribSetter class

 

[Example]

   attribSetter = eventPeOperator.GetAttribSetter()

 


 

GetLoggerOperator(): CENPyOlpLogOperator

 

o

return

Object of CENPyOlpLogOperator class

 

[Example]

   logOperator = eventPeOperator.GetLoggerOperator()

 


 

GetRefToolpathElementPosition(): CENPyOlpMatrix

 

o

return

Object of CENPyOlpMatrix class

 

[Example]

   pos = eventPeOperator.GetRefToolpathElementPosition()

 


 

GetCurrentToolFrameIndex(): int

 

 

o

return

Returns the index of the current tool frame for a specific toolpath element, defined on the operation level, or -1 if active tool is not set

 

GetCurrentToolframeIndex() with lowercase "frame" can also be used.

 

[Example]

currentToolFrameIndex = eventPeOperator.GetCurrentToolFrameIndex()

 


 

GetCurrentBaseFrameIndex(): int

 

 

o

return

Returns the index of the current base frame for a specific toolpath element, defined on the operation level, or -1 if active tool is not set

 

GetCurrentBaseframeIndex() with lowercase "frame" can also be used.

 

[Example]

currentBaseFrameIndex = eventPeOperator.GetCurrentBaseFrameIndex()

 


 

GetCurrentToolFrameMatrix(): CENPyOlpMatrix

 

 

o

return

Returns the matrix of the current tool frame for a specific toolpath element, defined on the operation level

 

GetCurrentToolframeMatrix() with lowercase "frame" can also be used.

 

[Example]

currentToolFrameMatrix = eventPeOperator.GetCurrentToolFrameMatrix()

 


 

GetCurrentBaseFrameMatrix(): CENPyOlpMatrix

 

 

o

return

Returns the matrix of the current base frame for a specific toolpath element, defined on the operation level

 

GetCurrentBaseframeMatrix() with lowercase "frame" can also be used.

 

[Example]

currentBaseFrameMatrix = eventPeOperator.GetCurrentBaseFrameMatrix()

 

 


 

IsEventCreatedAutomatically(): bool

 

o

return

True if the Event was created by a rule or by another Event, False if inserted manually.

 

Get if the reference event was created by a rule, another event, or inserted manually.

 

[Example]

logging.LogInfo(f"Current event was created automatically = {eventPeOperator.IsEventCreatedAutomatically()}.")

 


 

GetController(): CENPyOlpController

 

o

return

Object of CENPyOlpController class

 

This method returns the parent controller.

 

[Example]

   controller = operator.GetController()

 


 


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