Skip to Content

Program

Quick Facts

PropertyValue
ClassCENPyOlpProgram
Modulecenpylib.CENPyOlpProgram
Packagecenpylib
ReleaseR2026.1
Methods16

Quick Start

# Boilerplate Example program = ... # obtained from the runtime context result = program.GetName()

Method Index

MethodReturnsSummary
GetNamestrGet the name of the program.
GetAttribGetterCENPyOlpAttribGetterGet attribute getter interface which handles the Olp attribute container.
GetAttribSetterCENPyOlpAttribSetterGet attribute setter interface which handles the Olp attribute container.
GetOperationGroupslist[CENPyOlpOperationGroup]Get all operation groups of the program, including groups from subprogram calls.
GetOperationslist[CENPyOlpOperation]Get all operations of the program, including operations from subprogram calls.
GetLastCreatedOperationslist[CENPyOlpOperation]Get the last created and not deleted operations in the program.
GetTpElementslist[CENPyOlpTpElement]Get all toolpath elements of the program, including elements from subprogram calls.
GetTpElementsWithEventlist[CENPyOlpTpElement]Get all toolpath elements of the program with given event name, including elements from subprogram calls.
ProgramProcessGeometriesboolProgram the given process geometries in the active controller program with default tool and base frames.
ProgramProcessGeometriesboolProgram the given process geometries in the active controller program with specified tool and base frame indexes.
IsMainboolGet if the program has the “main” flag or is a subprogram.
GetTrackslist[CENPyOlpTrack]Get all toolpath tracks of the program.
SetToolFrameSets the tool frame for the program.
SetBaseFrameSets the base frame for the program.
DeleteOperationboolDeletes the specified operation from the program.
DeleteOperationGroupboolDeletes the specified operation group from the program.

Query Methods

GetName

def GetName() -> str

Get the name of the program.

Returns: str — Program name.

GetAttribGetter

def GetAttribGetter() -> CENPyOlpAttribGetter

Get attribute getter interface which handles the Olp attribute container.

Returns: CENPyOlpAttribGetter — Attribute getter interface.

GetAttribSetter

def GetAttribSetter() -> CENPyOlpAttribSetter

Get attribute setter interface which handles the Olp attribute container.

Returns: CENPyOlpAttribSetter — Attribute setter interface.

GetOperationGroups

def GetOperationGroups() -> list[CENPyOlpOperationGroup]

Get all operation groups of the program, including groups from subprogram calls.

Returns: list[CENPyOlpOperationGroup] — List of CENPyOlpOperationGroup objects, found operation groups.

GetOperations

def GetOperations() -> list[CENPyOlpOperation]

Get all operations of the program, including operations from subprogram calls.

Returns: list[CENPyOlpOperation] — List of CENPyOlpOperation objects, found operations.

GetLastCreatedOperations

def GetLastCreatedOperations() -> list[CENPyOlpOperation]

Get the last created and not deleted operations in the program.

Returns: list[CENPyOlpOperation] — List of CENPyOlpOperation objects, the last created operations.

GetTpElements

def GetTpElements() -> list[CENPyOlpTpElement]

Get all toolpath elements of the program, including elements from subprogram calls.

Returns: list[CENPyOlpTpElement] — List of CENPyOlpTpElement objects, found toolpath elements.

GetTpElementsWithEvent

def GetTpElementsWithEvent(eventName: str) -> list[CENPyOlpTpElement]

Get all toolpath elements of the program with given event name, including elements from subprogram calls.

Parameters:

NameTypeDescription
eventNamestrEvent name to search for.

Returns: list[CENPyOlpTpElement] — List of CENPyOlpTpElement objects, found toolpath elements with specified event.

IsMain

def IsMain() -> bool

Get if the program has the “main” flag or is a subprogram.

Returns: bool — True if the program is “main”, and False if it is a subprogram.

GetTracks

def GetTracks() -> list[CENPyOlpTrack]

Get all toolpath tracks of the program.

Returns: list[CENPyOlpTrack] — List of CENPyOlpTrack objects, found toolpath tracks.

Utilities

ProgramProcessGeometries

def ProgramProcessGeometries(processGeometries: list) -> bool

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

Parameters:

NameTypeDescription
processGeometrieslistProcess geometries to program.

Returns: bool — True if the operation was completed without errors, otherwise False.

SetToolFrame

def SetToolFrame(frame: CENPyOlpFrame)

Sets the tool frame for the program. This method updates the tool frame for the entire program, including all its components.

Parameters:

NameTypeDescription
frameCENPyOlpFrameA new tool frame to be set.

SetBaseFrame

def SetBaseFrame(frame: CENPyOlpFrame)

Sets the base frame for the program. This method updates the base frame for the entire program, including all its components.

Parameters:

NameTypeDescription
frameCENPyOlpFrameA new base frame to be set.

DeleteOperation

def DeleteOperation(operation: CENPyOlpOperation) -> bool

Deletes the specified operation from the program.

Parameters:

NameTypeDescription
operationCENPyOlpOperationThe operation to delete.

Returns: bool — True if the operation was successfully deleted, otherwise False.

DeleteOperationGroup

def DeleteOperationGroup(operationGroup: CENPyOlpOperationGroup) -> bool

Deletes the specified operation group from the program.

Parameters:

NameTypeDescription
operationGroupCENPyOlpOperationGroupThe operation group to delete.

Returns: bool — True if the operation group was successfully deleted, otherwise False.

ProgramProcessGeometries

def ProgramProcessGeometries(processGeometries: list, baseFrameIndex: int, toolFrameIndex: int) -> bool

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

Parameters:

NameTypeDescription
processGeometrieslistProcess geometries to program.
baseFrameIndexintBase frame index to use.
toolFrameIndexintTool frame index to use.

Returns: bool — True if the operation was completed without errors, otherwise False.

Changes in R2026.1.1

Compared to R2026.1:

  • Method count increased from 14 to 16

  • [NEW] DeleteOperation: New method added

  • [NEW] DeleteOperationGroup: New method added

Version Notes

This class is documented as of release R2026.1.1.

Was this page helpful?