I've been playing with the probing code posted by Brian on the Yahoo group. It works fine and you have control of how the data in the output file is formatted - comma separated, having XYZ prefix before the coordinates, omitting particular axis, etc. For your convenience, here is the orginal code Brian posted:
function M401()
inst = mc.mcGetInstance();
-- create the wxFrame window
mainframe = wx.wxFrame( wx.NULL, -- no parent
wx.wxID_ANY, -- whatever for wxWindow ID
"Mach4 Bolt Hole Wizard", -- frame caption
wx.wxDefaultPosition, -- place the frame in default position
wx.wxDefaultSize, -- default frame size
wx.wxDEFAULT_FRAME_STYLE ) -- use default frame styles
-- create a panel in the frame
panel = wx.wxPanel(mainframe, wx.wxID_ANY)--We are not going to show it but we need to have this to use the File dialog
local file = wx.wxFileDialog(panel, "Select Probe File", "", "", "Text files (*.txt)|*.txt|Tap files (*.tap)|*.tap",
wx.wxFD_SAVE,wx.wxDefaultPosition,wx.wxDefaultSize, "File Dialog" );
if(file:ShowModal() == wx.wxID_OK)then
local path = file:GetPath()
wx.wxMessageBox(tostring(path))
mc.mcCntlProbeFileOpen(inst, path, "X%.3AXIS_X Y%.3AXIS_Y Z%.3AXIS_Z \r\n", true);
end
end
if (mc.mcInEditor() == 1) then
M401()
end
You have to put it in a file and name it M401.mcs
To close the file, in a file named M400.mcs put this code:
function M400()
inst = mc.mcGetInstance();
mc.mcCntlProbeFileClose( inst );
end
if (mc.mcInEditor() == 1) then
M400()
end
Dan