The object of the CENPyOlpFrameChangedOperator class is passed to the PostTechOnFrameChanged and the PostWmOnFrameChanged callbacks as a parameter.
It can be used to obtain the required operators within the scope of the PostTechOnFrameChanged callback in the %Technology%.py script file or within the scope of the PostWmOnFrameChanged callback in the %WORKMETHOD_NAME%.py file. If the PostTechOnFrameChanged or the PostWmOnFrameChanged callback returns True the operation recompute (ENTERSTATE_STARTWITHRULEEVENTS) will be triggered.
The default return value is False and does not need to be specified.
[Example]
def PostTechOnFrameChanged(Operator):
return(False)
def PostWmOnFrameChanged(Operator):
return(False)
This operator gives the possibility to find attribute and get its value.
[Example]
attribGetter = Operator.GetAttribGetter()
This operator gives the possibility to change attribute value.
[Example]
attribSetter = Operator.GetAttribSetter()
This operator gives the possibility to log issues resulting by user input.
[Example]
logOperator = Operator.GetLoggerOperator()
This method returns the assigned controller.
[Example]
controller = Operator.GetController()
This operator gives the possibility to work with CSV files. Please check the CENPyOlpCsvParserOperator class to see all available functions.
[Example]
csvParser = Operator.GetCsvParserOperator()
•
|
GetTechTabFolder(fileName: string, feedbackErrorWhenFileNotFound: bool): string
|
|
|
Name of the file with extension or relative path to the file
|
|
o
|
feedbackErrorWhenFileNotFound
|
|
Activates feedback if no file is found. It is optional parameter and is True by default
|
|
|
Full path to the specified file
|
This method returns the full path to the specified technology table file.
[Example]
filePath = Operator.GetTechTabFolder("WeldingAttrib.csv")
•
|
GetChangedFrameName(): string
|
|
|
Name of the changed frame
|
This method returns the name of the changed frame.
[Example]
changedFrameName = Operator.GetChangedFrameName()
•
|
GetChangedFrameIndex(): int
|
|
|
Index of the changed frame
|
This method returns the index of the changed frame.
[Example]
changedFrameIndex = Operator.GetChangedFrameIndex()
|
|
Type of the changed frame
|
This method returns the type of the changed frame.
[Example]
changedFrameType = Operator.GetChangedFrameType()
if changedFrameType == FRAMETYPE_BASE:
logging.LogInfo("Newly changed frame type: Base")
if changedFrameType == FRAMETYPE_TOOL:
logging.LogInfo("Newly changed frame type: Tool")
This method returns the position matrix of the changed frame.
[Example]
matrix = Operator.GetChangedFrameMatrix()
This method returns the position matrix of the changed frame relative to the world.
[Example]
worldMatrix = Operator.GetChangedFrameWorldMatrix()
|