Python scripting - Objects

CENPyOlpProgram

 

Methods

 

GetName(): string

 

o

return

Program name

 

Returns the name of the program.

 

[Example]

   program = Operator.GetActiveProgram()

   programName = program.GetName()

 


 

IsMain(): bool

 

o

return

True if the program is "main", and False if it is a subprogram.

 

Returns if the program has the "main" flag or is a subprogram.

 

[Example]

   program = Operator.GetActiveProgram()

   logging.LogInfo(f"Active program is a Main program = {program.IsMain()}.")

 


 

GetAttribGetter(): CENPyOlpAttribGetter

 

o

return

Object of CENPyOlpAttribGetter class

 

Returns the CENPyOlpAttribGetter operator.

 

[Example]

   attribGetter = program.GetAttribGetter()

 


 

GetAttribSetter(): CENPyOlpAttribSetter

 

o

return

Object of CENPyOlpAttribSetter class

 

Returns the CENPyOlpAttribSetter operator.

 

[Example]

   attribSetter = program.GetAttribSetter()

 


 

GetOperationGroups(): list

 

o

return

list of CENPyOlpOperationGroup objects

 

Returns all operation groups of the program.

 

[Example]

   opGroups = program.GetOperationGroups()

 


 

GetOperations(): list

 

o

return

list of CENPyOlpOperation objects

 

Returns all operations of the program.

 

[Example]

   operations = program.GetOperations()

 


 

GetLastCreatedOperations(): list

 

o

return

list of CENPyOlpOperation objects

 

Returns last created operations of the program.

 

[Example]

   operations = program.GetLastCreatedOperations()

 


 

GetTpElements(): list

 

o

return

list of CENPyOlpTpElement objects

 

Returns all toolpath elements of the program.

 

[Example]

   tpes = program.GetTpElements()

 


 

GetTpElementsWithEvent(string: eventName): list

 

o

eventName

Event name to search for

 

o

return

list of CENPyOlpTpElement objects

 

Returns all toolpath elements of the program with given event name.

 

[Example]

   tpes = program.GetTpElementsWithEvent("EventName")

 


 

ProgramProcessGeometries(processGeometries: list): bool

 

o

processGeometries

list of CENPyOlpProcessGeometryOperator objects

 

o

return

True if the operation was completed without errors, otherwise False

 

Program the given process geometries in the active controller program with default tool and base frames.

 

[Example]

   isSuccessful = program.ProgramProcessGeometries(processGeometries)

   if isSuccessful:

      logging.LogInfo("Process geometry was successfully programmed.")

 


 

ProgramProcessGeometries(processGeometries: list, baseFrameIndex: int, toolFrameIndex: int): bool

 

o

processGeometries

list of CENPyOlpProcessGeometryOperator objects

 

o

baseFrameIndex

Base frame index to use

 

o

toolFrameIndex

Tool frame index to use

 

o

return

True if the operation was completed without errors, otherwise False

 

Program the given process geometries in the active controller program with specified tool and base frame indexes.

 

[Example]

   isSuccessful = program.ProgramProcessGeometries(processGeometries, 2, 1)

   if isSuccessful:

      logging.LogInfo("Process geometry was successfully programmed.")

 


 

GetTracks(): list

 

o

return

list of CENPyOlpTrack objects

 

Get all toolpath tracks of the program.

 

[Example]

   tracks = program.GetTracks()

 


 

 


Previous
Previous page
Chapter
Chapter page
Next
Next page