In the current version of simCNC, control over the soft limit setting is only possible via a checkbox (see default screen). In case you wish to control soft limits via a button (i.e. toggle the status) or control it from a Python script, here is the solution for you.
First, add a button to your screen. I went for an LED button as it can also display the status without any additional work.
The following settings are important. Don’t forget to set the button interval to 0… mine was first set to 1, which themes to be miliseconds and caused the button to flicker.
Create the script
Nothing to be scared about, it will just take a few lines of code. Give your script an easy to identify name and save it in your profile/<yourprofile>/scripts or screen/<yourscreen>/scripts folder. Mine is called btn_globalsoftlimits.
# if softlimits are currently ON, switch them OFF. And vice versa... if d.areAllSoftLimitsIgnored() == True: d.ignoreAllSoftLimits(False) else: d.ignoreAllSoftLimits(True)