How can I find the type of a GH_NumberSlider?

Hi,

How can I find the type of a GH_NumberSlider (float,integer, even, odd)?

I’ve tried a couple of things, but always get the same result (GH_Number or System.Decimal),
regardless of the type of the slider.

Thanks,
Thomas

Try GH_NumberSlider.Slider.Type == GH_SliderAccuracy.Float or GH_SliderAccuracy.Integer (other types: even and odd)

1 Like

Hi Menno,

Thanks, that does it.

Let me just add for completeness that GH_SliderAccuracy.Float is in Namespace Grasshopper.GUI.Base, while GH_NumberSlider.Slider.Type belongs to Grasshopper.Kernel.Special.

(This tripped me up at first.)