Parts

class pytm4srv.models.Part

Represents one produced part.

If a program produces multiple parts per cycle, multiple instances are created.

editor_id: Mapped[int | None]

ID of the user who last edited this part.

finished: Mapped[datetime]

The date and time this part was produced.

id: MappedColumn object at 0x7907c2991c60>]]

Unique (across all machines), numeric ID of this part in OnTakt.

notes: Mapped[str]

User-specified notes about this part.

program_id: Mapped[int]

The ID of the program that was loaded when this part was reported.

reworked: Mapped[bool]

Whether the part was reworked by the user.

scrapped: Mapped[bool]

Whether the part was scrapped by the user.

suspect: Mapped[bool]

Whether the part has been flagged for review.

tmac_monitored: Mapped[int]

Percentage of the production time TMAC was monitoring.

tool_life: Mapped[Dict[str, int]]

Record of the number of parts that have been produced by each tool at the time this part was produced.

Maps tool ID to number of parts.

tools_seen: Mapped[List[int]]

Tool locations that the machine reported using while producing this part.

variables: Mapped[Dict[str, int | float]]

Variable values saved with the part in the following format:

{
    "Serial number": 150,
    "Material heat": 14
}
work_order: Mapped[str]

User-specified work order name.