Python scripting - Auxiliary commands operators

CENPyOlpProgramModifyOperator

 

The object of the CENPyOlpProgramModifyOperator class is passed to the ModifyActiveProgram callbacks as a parameter.

It can be used to obtain the required operators within the scope of the ModifyActiveProgram callback in the Auxiliary commands script files, located in the folder of the plugin.

 

[Example]

def ModifyActiveProgram(Operator):

   pass

 

Methods

 

GetAttribGetter(): CENPyOlpAttribGetter

 

o

return

Object of CENPyOlpAttribGetter class

 

This operator gives the possibility to find attribute and get its value.

 

[Example]

   attribGetter = Operator.GetAttribGetter()

 


 

GetAttribSetter(): CENPyOlpAttribSetter

 

o

return

Object of CENPyOlpAttribSetter class

 

This operator gives the possibility to change attribute value.

 

[Example]

   attribSetter = Operator.GetAttribSetter()

 


 

GetLoggerOperator(): CENPyOlpLogOperator

 

o

return

Object of CENPyOlpLogOperator class

 

This operator gives the possibility to log issues resulting by user input.

 

[Example]

   logOperator = Operator.GetLoggerOperator()

 


 

GetController(): CENPyOlpController

 

o

return

Object of CENPyOlpController class

 

This method returns the assigned controller.

 

[Example]

   controller = Operator.GetController()

 


 

GetCsvParserOperator(): CENPyOlpCsvParserOperator

 

o

return

Object of CENPyOlpCsvParserOperator class

This operator gives the possibility to work with CSV files. Please check the CENPyOlpCsvParserOperator class to see all available functions.

 

[Example]

   csvParser = Operator.GetCsvParserOperator() 

 


 

GetActiveProgram(): CENPyOlpProgram

 

o

return

Object of CENPyOlpProgram class

Returns the active program of the controller, nullptr, if there is no program.

 

[Example]

   activeProgram = Operator.GetActiveProgram()

 


 

GetComputeHandler(): CENPyOlpComputeHandler

 

o

return

Object of CENPyOlpComputeHandler class

Returns the compute handler of the parent controller.

 

[Example]

   computeHandler = Operator.GetComputeHandler()

 


 

GetInterpolationHandler(): CENPyOlpInterpolationHandler

 

o

return

Object of CENPyOlpComputeHandler class

Get an interpolation handler.

 

[Example]

   interpolationHandler = Operator.GetInterpolationHandler()

 


 

GetTeachHandler(): CENPyOlpTeachHandler

 

o

return

Object of CENPyOlpTeachHandler class

Returns the teach handler for the current session.

 

[Example]

   teachHandler = Operator.GetTeachHandler()

 


 

GetEventHandler(): CENPyOlpEventHandler

 

o

return

Object of CENPyOlpEventHandler class

Returns the event handler for the current session.

 

[Example]

   eventHandler = Operator.GetEventHandler()

 


 

GetProgramTpElementsByName(string: programName): list

 

o

programName

Program name

 

o

return

list of CENPyOlpTpElement objects

Returns all toolpath elements of the program with the given name. If there is no program with that name the list is going to be empty.

 

[Example]

   tpes = olpOperation.GetProgramTpElementsByName("PRG001")

 


 

CreateMatrix(): CENPyOlpMatrix

 

o

return

Object of CENPyOlpMatrix

Returns an initial empty Matrix for further use

 

[Example]

   newMatrix = Operator.CreateMatrix()

   newMatrix.Translate(0.1, 0.2, 0.3, POSRELATION_BASEFRAME)

 


 



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