[Python] Button in Custom Instrument

Hi,

Is it possible to add buttons to instrument settings panel?
I tried to add the button using:

@attribute(Display("Reset Coordinates to  [0,0,0]", "Coordinates", "AR Coordinates"))
@attribute(Browsable(True))
def ResetCoordinates(self):
    self.log.Info("Reseeting Coordinates")

The above code snippet doesn’t work.

Regards.

In the BasicFunctionality example this is described:

    #This Reset Frequency method is exposed to the user as a button that can be clicked.
    @attribute(Browsable(True))
    @attribute(OpenTap.EnabledIf("FrequencyIsDefault", False, HideIfDisabled = True))
    @attribute(OpenTap.Display("Reset Frequency", None))
    @method()
    def resetFrequency(self):
        self.Frequency = 1e9

You just need to declare that your method should be a CLR method.