Machsupport Forum
Support => Downloads => MACH TOOL BOX => Topic started by: vmax549 on March 27, 2009, 09:03:55 PM
-
Here is a macro that prints out eh Fixture offset values. It write to a file called FixtureOffsetvalues in the Mach directory. It also prints to the local printer.
It can be called from a button script or from the MDI line.
CodeExample:
'Macro Fixture Offsets
textFilePath = "C:\mach3\FixOffsetInfo.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(textFilePath)
Do Until num=10320
Num=5222
num=num+1
N = GetVar(num)
Dt= Date()
Tm= Time()
If N <>"0" Then
objTextFile.WriteLine("Parameter"& num &" * "& N & Chr(13) & Chr(10))
Else
End If
Loop
objTextFile.WriteLine("**")
objTextFile.WriteLine(" Date: " &Dt &" Time: " &Tm)
objTextFile.Close
Dim sCOMMAND As String
sCOMMAND="print c:\mach3\FixOffsetInfo.txt"
Shell("c:\winnt2\system32\cmd.exe /c" & sCOMMAND)
End
-
Hi Tony,
I tried this macro. I set up 5 fixture offsets in sim to experiment with and get "Error on line: 31 - Path not found".
Also got the same with 8888 from your other post the other day.
Just playin' to learn.
Thanks,
RC :)
-
HI RC, The program assumes the path to the Shell command is the one on that line. Your path to the shell command may be different(;-) I had to do a search to find it here.
Let me know if that fixes it for you.
(;-) TP