Get-Set Checkbox??

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Get-Set Checkbox??

Postby ger21 » Fri Oct 07, 2016 12:43 am

Are there any functions for getting or setting a checkbox's value?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Get-Set Checkbox??

Postby ger21 » Fri Oct 07, 2016 10:34 am

Thanks.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Get-Set Checkbox??

Postby mayhem2408 » Tue Sep 11, 2018 1:58 am

I have a question/problem with the AS3.Setcheckboxstatus() function.

My macro runs AS3.Setcheckboxstatus(true,56); to change the active low checkbox on the probe. I can see that the check box is changed when the macro is finished, but the probe is still behaving as if the checkbox is not checked. I have to apply the settings to make it work. Should I be using callbutton to press the Apply settings button, or should Setcheckboxstatus be working without this.

The reason for this is a have a couple of different probing methods and one is NO (Normally Open) and the other is NC (Normally Closed). I need my macro to switch between the two.
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: Get-Set Checkbox??

Postby cncdrive » Tue Sep 11, 2018 11:53 am

Yes, you have to call the Apply settings button to validate the new settings.
There are 2 probe inputs in our ethernet controllers for exactly this purpose, because one probe can be NO and the other NC. This function does not fit in the UC100 unfortunately, it only has one probe input, but your workaround with the macro you described should work.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: Get-Set Checkbox??

Postby mayhem2408 » Tue Sep 11, 2018 10:01 pm

Thanks. It does work fine. I have two different probes what I have attached to simple RCA plugs. My macro will pop up a message box saying which probe to connect and then changes the Active low to suit that probe. It is working great.
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am


Return to Macros

Who is online

Users browsing this forum: No registered users and 11 guests