Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 67020

Run Journal File via Process

$
0
0

Hello, I am trying to run the below, which is via a Consul or Windows exe.

This works, when process.Start(); is fired and the Consul or exe closes.

  private void runMe()
        {
            string processPath = "C:\\Program Files\\Autodesk\\Revit 2017\\Revit.exe";
            string journalFilePath = "C:\\ProgramData\\Autodesk\\Revit\\Addins\\2017\\test.txt";

            System.Diagnostics.Process process = new System.Diagnostics.Process { StartInfo = new ProcessStartInfo(processPath, journalFilePath) };
            process.Start();
            //close, end, exit
        }

 

This does not, when process.WaitForExit(); is called or the Consul or exe does not run until completion.

private void runMe()
        {
            string processPath = "C:\\Program Files\\Autodesk\\Revit 2017\\Revit.exe";
            string journalFilePath = "C:\\ProgramData\\Autodesk\\Revit\\Addins\\2017\\test.txt";

            System.Diagnostics.Process process = new System.Diagnostics.Process { StartInfo = new ProcessStartInfo(processPath, journalFilePath) };
            process.Start();
            process.WaitForExit();
        }

The later, instead of loading the replaying the Journal file tries to load it Jrn.Data "File Name"  , "IDOK", "..\..\..\..\..\..\..\..\ProgramData\Autodesk\Revit\Addins\2017\DynamoJournalFile-1.txt".

 

Revit seems to wait for the parent process to end before it will run the Journal file...

 

I'm sure I am missing something simple, just seeing 1's and 0's

 


Viewing all articles
Browse latest Browse all 67020

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>