I receive an error when I try to delete a tool I believe.
Thanks!
Error deleting tool.
-
- Vectric Apprentice
- Posts: 62
- Joined: Sun Feb 21, 2021 8:10 am
- Model of CNC Machine: EZ Route 4x8/WinCNC
- Location: Williamstown, WV
- jimandi5000
- Vectric Wizard
- Posts: 1094
- Joined: Wed Mar 11, 2015 6:50 pm
- Model of CNC Machine: Home Made 60 x 120
- Location: North Houston Tx.
- Contact:
Re: Error deleting tool.
Hi Bill,
I will look into this and see if I can reproduce the issue and add an error trap to manage the issue.
Can you send me the EXPORT file for this drawing?
Jim@JimAndI.com
Thanks,
Jim
Jim
- sharkcutup
- Vectric Wizard
- Posts: 3432
- Joined: Sat Mar 26, 2016 3:48 pm
- Model of CNC Machine: Shark HD3 Pro Extended Bed with Spindle
- Location: U.S.A.
Re: Error deleting tool.
Tool Clear3 seems to be working okay on my copy of the code BUT
I am finding that the Last Tool Clear Button (7th Tool) posts an error message similar to the OP's post.
Jim you may want to add this below to the Dialog File. It is not there ---
Function OnLuaButton_FunctionClear7(Pdialog) -- Tool clear 7
Pdialog:UpdateLabelField("DialogWindow.Alert", "")
MillTool7.Name = "No Tool Selected"
Pdialog:UpdateLabelField("ToolNameLabel7", MillTool7.Name)
RegistryWrite()
return true
end -- function end
Added the above to my copy and now that clear button woks fine.
Sharkcutup
I am finding that the Last Tool Clear Button (7th Tool) posts an error message similar to the OP's post.
Jim you may want to add this below to the Dialog File. It is not there ---
Function OnLuaButton_FunctionClear7(Pdialog) -- Tool clear 7
Pdialog:UpdateLabelField("DialogWindow.Alert", "")
MillTool7.Name = "No Tool Selected"
Pdialog:UpdateLabelField("ToolNameLabel7", MillTool7.Name)
RegistryWrite()
return true
end -- function end
Added the above to my copy and now that clear button woks fine.
Sharkcutup
V-Carve Pro Tips, Gadget Tips & Videos
YouTube Channel - Sharkcutup CNC
V-Carve Pro 12.013
YouTube Channel - Sharkcutup CNC
V-Carve Pro 12.013
- jimandi5000
- Vectric Wizard
- Posts: 1094
- Joined: Wed Mar 11, 2015 6:50 pm
- Model of CNC Machine: Home Made 60 x 120
- Location: North Houston Tx.
- Contact:
Re: Error deleting tool.
Thanks.sharkcutup wrote: ↑Fri Jun 14, 2024 4:07 amTool Clear3 seems to be working okay on my copy of the code BUT
I am finding that the Last Tool Clear Button (7th Tool) posts an error message similar to the OP's post.
Jim you may want to add this below to the Dialog File. It is not there ---
Function OnLuaButton_FunctionClear7(Pdialog) -- Tool clear 7
Pdialog:UpdateLabelField("DialogWindow.Alert", "")
MillTool7.Name = "No Tool Selected"
Pdialog:UpdateLabelField("ToolNameLabel7", MillTool7.Name)
RegistryWrite()
return true
end -- function end
Added the above to my copy and now that clear button woks fine.
Sharkcutup
Thanks,
Jim
Jim
- sharkcutup
- Vectric Wizard
- Posts: 3432
- Joined: Sat Mar 26, 2016 3:48 pm
- Model of CNC Machine: Shark HD3 Pro Extended Bed with Spindle
- Location: U.S.A.
Re: Error deleting tool.
Same Dialog File ---
line 3160 --- </tr> from
remove the word -- from
Not exactly sure why that is there but I believe it is not needed.
Sharkcutup
line 3160 --- </tr> from
remove the word -- from
Not exactly sure why that is there but I believe it is not needed.
Sharkcutup
V-Carve Pro Tips, Gadget Tips & Videos
YouTube Channel - Sharkcutup CNC
V-Carve Pro 12.013
YouTube Channel - Sharkcutup CNC
V-Carve Pro 12.013
- adze_cnc
- Vectric Wizard
- Posts: 5107
- Joined: Sat Jul 27, 2013 10:08 pm
- Model of CNC Machine: AXYZ 4008 (VCarve Pro v9.519)
- Location: Vancouver, BC, Canada
Re: Error deleting tool.
Jim:
function InquiryWallOrBase at line 94 needs changing to the following as it refers to both tool 7 and tool 6:
function InquiryWallOrBase at line 94 needs changing to the following as it refers to both tool 7 and tool 6:
Code: Select all
if dialog:GetTool("ToolChooseButton7") then
MillTool7 = dialog:GetTool("ToolChooseButton7") -- ???? comment wrong but I don't know what is right ???
end
- adze_cnc
- Vectric Wizard
- Posts: 5107
- Joined: Sat Jul 27, 2013 10:08 pm
- Model of CNC Machine: AXYZ 4008 (VCarve Pro v9.519)
- Location: Vancouver, BC, Canada
Re: Error deleting tool.
I wonder if those seven OnLuaButton_FunctionClear<n> functions could be replaced with:
Note: I haven't actually tested the code but it should work (famous last words).
Code: Select all
function clearMillToolFromDialog(Pdialog, toolNumber)
local function createToolArray()
local MillTools= {MillTool1, MillTool2, MillTool3,
MillTool4, MillTool5, MillTool6, MillTool7
}
return MillTools
end
local function updateDialogAndRegistry(toolNumber, toolName)
Pdialog:UpdateLabelField("ToolNameLabel" .. tostring(toolNumber), toolName)
RegistryWrite()
end
if toolNumber == nil then return false end
local MillTools = createToolArray()
local millTool = MillTools[toolNumber]
millTool.Name = "No Tool Selected"
updateDialogAndRegistry(toolNumber, millTool.Name)
end
function OnLuaButton_FunctionClear1(Pdialog)
clearMillToolFromDialog(Pdialog, 1)
return true
end
-- =====================================================]]
function OnLuaButton_FunctionClear2(Pdialog)
clearMillToolFromDialog(Pdialog, 2)
return true
end
-- =====================================================]]
function OnLuaButton_FunctionClear3(Pdialog)
clearMillToolFromDialog(Pdialog, 3)
return true
end
-- =====================================================]]
function OnLuaButton_FunctionClear4(Pdialog)
clearMillToolFromDialog(Pdialog, 4)
return true
end
-- =====================================================]]
function OnLuaButton_FunctionClear5(Pdialog)
clearMillToolFromDialog(Pdialog, 5)
return true
end
-- =====================================================]]
function OnLuaButton_FunctionClear6(Pdialog)
clearMillToolFromDialog(Pdialog, 6)
return true
end
-- =====================================================]]
function OnLuaButton_FunctionClear7(Pdialog)
clearMillToolFromDialog(Pdialog, 7)
return true
end
- jimandi5000
- Vectric Wizard
- Posts: 1094
- Joined: Wed Mar 11, 2015 6:50 pm
- Model of CNC Machine: Home Made 60 x 120
- Location: North Houston Tx.
- Contact: