Sets a callback function to be executed when the “Apply,” “OK,” or “Close” button is clicked in a dialog.
planetcnc.dlg_callback(handle, callback)
#! /usr/bin/env python import planetcnc # Define a callback function def on_dialog_action(): print("Dialog button clicked!") # Set the callback for a specific dialog dialog_handle = "MyDialogHandle" planetcnc.dlg_callback(dialog_handle, on_dialog_action) print("Callback function set.")