Skip to Main Content
Centro Assistenza Cognex
LogoLogo

How to Set an EditInt Cell to a Specific Value From a Button

Walkthrough on how to control the value of an EditInt function in an In-Sight Spreadsheet Cell using a Button function

15/09/2024

Question

How can I give a user the possibility to restore a set of default values for runtime parameters that can be changed?

Answer

For this you typically need to set an EditInt or EditFloat cell to a specific value.

To force a numeric Edit cell to a specific value, you can manipulate its Min and Max property.

For example: open an empty job and set the following cells:

A3 = ' EditInt:

B3 = EditInt(B5,B6)

A5 = ' Min

B5 = If($D$3,$D$4,0)

A6 = ' Max

B6 = If($D$3,$D$4,500)

D3 = Button(" Set Value",-1)

D4 = EditInt(0,255)

Risorse correlate

Loading component...