Retrieves a global or local parameter from the PlanetCNC application's parameter storage.
The function takes a parameter name as a string, looks up its value and returns it.
Value can be float or string.
planetcnc.param_get(name) planetcnc.param_get(name, index)
#! /usr/bin/env python import planetcnc # List slots and assigned tools slot_count = planetcnc.param_get("_slot_count") for slot_idx in range(slot_count): slot_num = planetcnc.param_get("_slot_get", slot_idx) tool_num = planetcnc.param_get("_slot_tool", slot_num) print(f"Slot {slot_num} has number{slot_num} and assigned tool {tool_num}.")