Skip to Content

Program

Quick Facts

PropertyValue
ClassCENPyOlpProgram
Modulecenpylib.CENPyOlpProgram
Packagecenpylib
ReleaseR2025.2.4
Methods12

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.

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.

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.

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?