Page 1 of 1
Radio Button
Posted: Thu Nov 21, 2013 2:07 pm
by jthornton
I'm trying to figure out a way to limit the thickness list for each nozzle. So I came up with using a radio button for each nozzle and next to it a combo box that only list thickness that would be appropriate for that nozzle. What I'm having trouble with is finding out which radio button is checked.
- CAM Configuration.png (20.69 KiB) Viewed 10899 times
Thanks
JT
Re: Radio Button
Posted: Sat Nov 23, 2013 1:12 am
by jthornton
Anyone have an idea on how to get the currently selected radio button? I've searched and guessed till the cows came home...
Thanks
JT
Re: Radio Button
Posted: Sat Nov 23, 2013 11:44 am
by andrew
If you assigned the object name "MyRadioButton" to a radio button, its value should be available as property with key "Cam/MyRadioButton":
layer.getCustomProperty("QCADCAM", "Cam/MyRadioButton");
Re: Radio Button
Posted: Sat Nov 23, 2013 2:03 pm
by jthornton
It is a global option so I get errors trying to use layer.
I'm calling the function from writeToolDown:
Code: Select all
// probe for material top and fire the torch
Plasma.prototype.writeToolDown = function() {
this.g = GCode.Mode.Normal;
this.z = this.getToolDownLevel();
this.nozzle = this.getNozzle();
this.thickness = this.getThickness();
this.settings = this.getCuttingInfo(this.getNozzle(),this.getThickness());
qDebug("radio " + this.getRadio());
this.toolIsDown();
};
I tried many things including this:
Code: Select all
Plasma.prototype.getRadio = function() {
var layerId = entity.getLayerId();
var layer = this.document.queryLayer(layerId);
qDebug("button group " + layer.getCustomProperty("QCADCAM", "Cam/radioFC"));
return;
};
Thanks for your help
JT