Mach Discussion > VB and the development of wizards

Tooltable import export and reset macros

(1/2) > >>

Rimmel:
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.

JohnHaine:
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.

Rimmel:

--- Quote from: JohnHaine 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.

--- End quote ---

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

JohnHaine:
Thanks - Win XP.

Rimmel:
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

Navigation

[0] Message Index

[#] Next page

Go to full version