Program
Quick Facts
| Property | Value |
|---|---|
| Class | CENPyOlpProgram |
| Module | cenpylib.CENPyOlpProgram |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 12 |
Quick Start
# Boilerplate Example
program = ... # obtained from the runtime context
result = program.GetName()Method Index
| Method | Returns | Summary |
|---|---|---|
GetName | str | Get the name of the program. |
GetAttribGetter | CENPyOlpAttribGetter | Get attribute getter interface which handles the Olp attribute container. |
GetAttribSetter | CENPyOlpAttribSetter | Get attribute setter interface which handles the Olp attribute container. |
GetOperationGroups | list[CENPyOlpOperationGroup] | Get all operation groups of the program, including groups from subprogram calls. |
GetOperations | list[CENPyOlpOperation] | Get all operations of the program, including operations from subprogram calls. |
GetLastCreatedOperations | list[CENPyOlpOperation] | Get the last created and not deleted operations in the program. |
GetTpElements | list[CENPyOlpTpElement] | Get all toolpath elements of the program, including elements from subprogram calls. |
GetTpElementsWithEvent | list[CENPyOlpTpElement] | Get all toolpath elements of the program with given event name, including elements from subprogram calls. |
ProgramProcessGeometries | bool | Program the given process geometries in the active controller program with default tool and base frames. |
ProgramProcessGeometries | bool | Program the given process geometries in the active controller program with specified tool and base frame indexes. |
IsMain | bool | Get if the program has the “main” flag or is a subprogram. |
GetTracks | list[CENPyOlpTrack] | Get all toolpath tracks of the program. |
Query Methods
GetName
def GetName() -> strGet the name of the program.
Returns: str — Program name.
GetAttribGetter
def GetAttribGetter() -> CENPyOlpAttribGetterGet attribute getter interface which handles the Olp attribute container.
Returns: CENPyOlpAttribGetter — Attribute getter interface.
GetAttribSetter
def GetAttribSetter() -> CENPyOlpAttribSetterGet 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:
| Name | Type | Description |
|---|---|---|
eventName | str | Event name to search for. |
Returns: list[CENPyOlpTpElement] — List of CENPyOlpTpElement objects, found toolpath elements with specified event.
IsMain
def IsMain() -> boolGet 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) -> boolProgram the given process geometries in the active controller program with default tool and base frames.
Parameters:
| Name | Type | Description |
|---|---|---|
processGeometries | list | Process geometries to program. |
Returns: bool — True if the operation was completed without errors, otherwise False.
ProgramProcessGeometries
def ProgramProcessGeometries(processGeometries: list, baseFrameIndex: int, toolFrameIndex: int) -> boolProgram the given process geometries in the active controller program with specified tool and base frame indexes.
Parameters:
| Name | Type | Description |
|---|---|---|
processGeometries | list | Process geometries to program. |
baseFrameIndex | int | Base frame index to use. |
toolFrameIndex | int | Tool frame index to use. |
Returns: bool — True if the operation was completed without errors, otherwise False.
Related Types
Version Notes
This class is documented as of release R2025.2.4.