Machsupport Forum
Support => Downloads => MACH TOOL BOX => Topic started by: vmax549 on March 27, 2009, 08:49:22 PM
-
Here is a macro that scans all the system Vars and prints out a list of any VAR that has a vlaue greater than Zero. It will also write a report to the Mach dirctory and print to the local printer.
It can be called as a button script or from the MDI line.
CODE EXAMPLE:
'Macro Parameter Value Info
textFilePath = "C:\mach3\ParamValueInfo.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(textFilePath)
Dt= Date()
Tm= Time()
objTextFile.WriteLine("ParamValueInfo")
objTextFile.WriteLine(" Date: " &Dt &" Time: " &Tm)
Num=0
Do Until num=10320
num=num+1
N = GetVar(num)
If N <>"0" Then
objTextFile.WriteLine("Parameter# "& num &" * "& N & Chr(13) & Chr(10))
Else
End If
Loop
objTextFile.Close
Dim sCOMMAND As String
sCOMMAND="print c:\mach3\ParamValueInfo.txt"
Shell("c:\winnt2\system32\cmd.exe /c" & sCOMMAND)
End
-
Where have I seen this before ??? ??? ???
http://www.machsupport.com/forum/index.php/topic,4290.20.html