Hello Guest it is April 23, 2024, 02:31:54 PM

Author Topic: Macro, Parameter Value Report  (Read 5159 times)

0 Members and 1 Guest are viewing this topic.

vmax549

*
Macro, Parameter Value Report
« 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     
« Last Edit: August 04, 2009, 09:48:36 PM by vmax549 »
Re: Macro, Parameter Value Report
« Reply #1 on: August 04, 2009, 01:31:53 PM »
"If you tell a lie big enough and keep repeating it, people will eventually come to believe it." - Joseph Goebels