Viewlogic.Exec Run STDOUT

Discussion created by beltz on Apr 2, 2020
Latest reply on Apr 5, 2020 by beltz

How can I get to the StdOut from a  ViewLogic.Exec .Run command?


For example on Linux I'm running with automation in Layout

Dim ExecObj

Set ExecObj = CreateObject("ViewLogic.Exec")

Call ExecObj.Run("strings " & asmdwgfilename & " | grep /CreationDate ")

How to I get to the StdOut from the above command?  I've tried redirecting the output to a file with the Run command ( > temp.txt) but this doesn't do anything, so I'm wondering if I can get to the StdOut directly like you can with WScript.


I know this capability is available within WScript, such as

Dim WshShell, oExec, input
Set WshShell = CreateObject("WScript.Shell")
Set oExec    = WshShell.Exec("test.bat")
input = ""


Do While True


     If Not oExec.StdOut.AtEndOfStream Then
          input = input & oExec.StdOut.Read(1)
          If InStr(input, "Press any key") <> 0 Then Exit Do
     End If
     WScript.Sleep 100



Walt Beltz

Lexmark International, Inc

Lexington, KY