Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 12:19:42 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Third party software and hardware support forums.
| |-+  Newfangled Solutions Wizards (Moderator: Ron Ginger)
| | |-+  Tool Number read from Mach's Tool Table?
Pages: « 1 2 3   Go Down
Print
Author Topic: Tool Number read from Mach's Tool Table?  (Read 5864 times)
0 Members and 2 Guests are viewing this topic.
keithorr
Active Member

Offline Offline

Posts: 17



View Profile WWW
« Reply #20 on: March 10, 2008, 10:53:32 PM »

Just a little add onto this thread:

' append to file = C:\Mach3\macros\toolinfo.txt
 
N = GetToolDesc(1)
D = GetToolParam(1,1)
L = GetToolParam(1,2)

textFilePath = "C:\mach3\macros\toolinfo.txt"

Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.opentextfile(textFilePath,ForAppending)

objTextFile.WriteLine("Tool1: " & N &" Diameter: "& D  &" Length: " & L)

objTextFile.Close

'End

'Now to learn how to scroll through the tool table (until there are no more descriptions) and overwrite the text file.

'Put it all in a button and I can "export" the info.

'I'm just wanting a tool information cheat sheet to take back to my desk while I fiddle with the CAM.

'All suggestions graciously accepted.
« Last Edit: March 11, 2008, 08:58:37 PM by keithorr » Logged

"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels
keithorr
Active Member

Offline Offline

Posts: 17



View Profile WWW
« Reply #21 on: March 11, 2008, 01:04:55 AM »

This reads information from the tooldata file and overwrites a text file up to 100 tools
Stops writing with the first instance of "Empty" as a tool description

////'PLEASE BE SURE YOU UNDERSTAND WHAT YOU'RE DOING WITH THIS FILE OR ELSE JUST WALK AWAY/////

'Create a New Button on a Screen using the Mach3Screen.exe.
'(Load the screen set you usually use) I placed one on the Offsets Screen for my use. You may have a better location.

'Paste the text below into the VB window of the Button Properties Screen
'The new button will create and update a text file on your desktop showing tool information up to 100 tools.
'Useful to have when your CAD/CAM is on another PC.


' overwrite file = C:\Documents and Settings\All Users\Desktop\ToolInfo.txt

textFilePath = "C:\Documents and Settings\All Users\Desktop\ToolInfo.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(textFilePath)


Do Until num=100

num=num+1

N = GetToolDesc(num)
D = GetToolParam(num,1)
L = GetToolParam(num,2)

objTextFile.WriteLine("Tool"& num &" "& N &" Diameter: "& D &" Length: "& L & Chr(13) & Chr(10))

If N ="Empty" Then num = 100



Loop

objTextFile.Close

'End
« Last Edit: March 11, 2008, 08:58:53 PM by keithorr » Logged

"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels
keithorr
Active Member

Offline Offline

Posts: 17



View Profile WWW
« Reply #22 on: March 11, 2008, 02:33:48 PM »

newer version will poll up to 225 tools and skip any tool with a description of "empty"

' overwrite file = C:\Documents and Settings\All Users\Desktop\ToolInfo.txt

textFilePath = "C:\Documents and Settings\All Users\Desktop\ToolInfo.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(textFilePath)


Do Until num=225

num=num+1

N = GetToolDesc(num)
D = GetToolParam(num,1)
L = GetToolParam(num,2)

If N <>"Empty" Then

objTextFile.WriteLine("Tool"& num &" "& N &" Diameter: "& D &" Length: "& L & Chr(13) & Chr(10))

Else

End If

Loop

objTextFile.Close

'End
« Last Edit: March 11, 2008, 08:58:15 PM by keithorr » Logged

"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels
zealous
Active Member

Offline Offline

Posts: 486



View Profile WWW
« Reply #23 on: March 21, 2008, 07:41:31 AM »

thanks Keith very helpful and nice way to do it Smiley
Logged

Regards, Jason Blake

www.Fusioncnc.com
vmax549
Guest
« Reply #24 on: March 22, 2008, 11:12:48 PM »

Keith thanks for the macro, I have asked Art in the past for such a thing. It is extremely handy to have the tool table handy when you are3 working in cad or just loading up a tool carousel for a job.

You may want to consider posting all parameters of each tool to the file. the tool may measure say .375 but actually cut.3765, so the wear diam are very important also. We use them to setup the exact cutting diam if known.

(;-) TP
Logged
vmax549
Guest
« Reply #25 on: March 25, 2008, 08:07:30 PM »

HI  Keithorr, WOuld it be possible to  have the utility write to a LPT port to print the tool table??? It would be nice to make sure the toolbook was current.\

(;-) TP
Logged
Pages: « 1 2 3   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!