question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Execute Console App from Revit

See original GitHub issue

Hi, I think this repo can be useful to execute a Console App from Revit, because the console app has async code, so I want to await the result of the console app before I trigger any ExternalEvent from Revit.

I’m new to this, so perhaps there is a simple way to explain how to: Start Revit Command -> Start Console App -> Await Result -> use Result in ExternalEvent -> do Transaction()

any tips on how to achieve this?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
KennanChancommented, Sep 30, 2022

Weakly related to Revit.Async, I think I can close this issue

0reactions
KennanChancommented, Sep 12, 2022

The key is to use TaskCompletionSource<T> class. It generates a Task<T> object for other logic to wait. And use TrySetResult<T>(T result) to signal that the Task<T> completes and other logic is can run.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to access Revit COM from Console Application ...
I'm writing a console application in C#.net and I was hoping to access the Revit API's by including them as references.
Read more >
Launching a Stand-alone Executable
A colleague of mine asked for some help implementing a Revit add-in to launch an external stand-alone Windows executable from the Revit user ......
Read more >
c# - Connection Between External Application and Revit?
1 Answer 1 ... You can use any kind of interprocess communication that you like. No workarounds are needed. It will work forever....
Read more >
A Command Line for Revit - Camilion
Put simply, CommandFinder is just the Command Line Prompt for Revit®. ... Clicking on the go button or pressing enter will execute the...
Read more >
DynamoDS/RevitTestFramework: Unit Testing on Revit
A Console application to run test from a command line; RevitTestFrameworkGUI.exe. A GUI application that allows easy selection of tests to run and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found