Hello Guest it is March 28, 2024, 12:51:10 PM

Author Topic: Tooltable import export and reset macros  (Read 6222 times)

0 Members and 1 Guest are viewing this topic.

Offline Rimmel

*
  •  207 207
    • View Profile
Tooltable import export and reset macros
« on: July 13, 2014, 09:50:34 AM »
OK after getting cheesed off entering tool tables on my lathe I decided to create a couple of macros that would let me export and import said tool tables.

I got started after reading Keithorr's original post on here from way back in 2008  http://www.machsupport.com/forum/index.php/topic,4290.20.html

Files:
Export.txt - exports the tool table to semi colon delimited text file called ToolTable.txt to the C:\Mach3 directory
Reset.txt - resets the Mach3 tool table to default
Import.txt - imports previously created Tooltable.txt file

Usage:
Change the text file names to a valid macro file name e.g. M205.m1s and execute

Bugs/Problems:
There seems to be no facility in Mach3 to read or save the Tip Direction or the Post settings in the macros language.

Also the VB Scripting language in Mach3 does not seem to support the Split() function which was a bit of a headache so I had to mackle together a couple of functions to perform the same action with the functions available. One line of code turned into lots  :-\


They are fairly basic with no error checking to speak of. But they may help someone.

Cheers
Rim

PS theres an extra ";" at the end of each line in the tooltable.txt, leave it in - it was easier to make the code work. I could have fixed it but the extra lines of code didn't seem to warrant it.
« Last Edit: July 13, 2014, 09:53:50 AM by Rimmel »
Re: Tooltable import export and reset macros
« Reply #1 on: May 09, 2018, 01:24:06 PM »
Hi Rimmel, I know it's a long time since you posted this but I have a question please?

Maybe a silly question, but what do you mean by "execute"  I tried the first (which I called M205 like you) from the MDI but nothing happened, so I opened it in the script editor and ran it there and it did - an exported my tooltable, result!  Is that the right way to do it?

But executing like this from the VB editor does seem to work well, just what I need.

Offline Rimmel

*
  •  207 207
    • View Profile
Re: Tooltable import export and reset macros
« Reply #2 on: May 10, 2018, 04:08:44 AM »
Hi Rimmel, I know it's a long time since you posted this but I have a question please?

Maybe a silly question, but what do you mean by "execute"  I tried the first (which I called M205 like you) from the MDI but nothing happened, so I opened it in the script editor and ran it there and it did - an exported my tooltable, result!  Is that the right way to do it?

But executing like this from the VB editor does seem to work well, just what I need.

Honestly I cant even remember doing these... I would guess you have to use the VB editor because it ises the createobject call. I will try it on mine. What OS are you using?

Cheers
Re: Tooltable import export and reset macros
« Reply #3 on: May 10, 2018, 04:22:03 AM »
Thanks - Win XP.

Offline Rimmel

*
  •  207 207
    • View Profile
Re: Tooltable import export and reset macros
« Reply #4 on: May 10, 2018, 04:46:44 AM »
Worked fine on mine from the MDI in mach3turn.

Place the file in the correct macros folder, in my case c:\mach3\macros\mach3turn. Changed its name to M205.m1s  (m - one - s)

Then in mach3turn in the manual screen open the mdi txt drop down and type "M205"  (without the quiotes). you don't need the .m1s on the end.

The resulting tooltable.txt is saved in the c:\mach3 folder.



Tried it on XP and Win7 - both working fine.

Edit: Make sure you run Mach3 as administrator (right click -> run as....). Even better right click mach3 icon -> properties -> and somewhere on the tabs will be a run as administrator tickbox. Tick it.

cheers
Rimmel
« Last Edit: May 10, 2018, 04:57:04 AM by Rimmel »
Re: Tooltable import export and reset macros
« Reply #5 on: May 10, 2018, 07:39:27 AM »
Thanks - I'll try again from the MDI.

Offline Rimmel

*
  •  207 207
    • View Profile
Re: Tooltable import export and reset macros
« Reply #6 on: August 15, 2019, 07:56:37 AM »
Also the tools have to be names... it will only pick up tools that have their names changed from the default "Empty"