I've sucessfully implemented Sony PJM's Suggestion for calling a C# class.
My EntryFunction fires open a standard windows form using C# Application.Run method. This, I believe, blocks the main Vegas thread from responding to user input (ie click on tracks, selecting events, working with menus etc). Hovering over the Vegas app produces a wait-cursor, as expected. I believe PJM has good reason for doing this.
However, I'd like the form NOT to block the main Vegas app. Essentially, running the .js would fire the C# app, and the main thread in Vegas would continue like the .js script is done running. The C# app would be running in a Vegas "owned" thread. This is so the user can interact with vegas and the C# application concurrently.
I can sucessfully achieve letting Vegas continue by spinning off a new thread (via System.Threading) in the EntryFunction. The new thread opens the form with a reference to the original Project. However, my problem is that the passed in Project reference is no longer available after the EntryFunction completes and the .js is done running.
a) Is there anyway to maintain this project reference as passed in by the .js file, or reestablish it?
b) Maybe there is an easier method where the C# app runs outside of vegas. I really haven't investigated my options there yet.
c) Basically, I'm looking for an interactive method to work with Vegas while the script is running.
thank you,
Mike
My EntryFunction fires open a standard windows form using C# Application.Run method. This, I believe, blocks the main Vegas thread from responding to user input (ie click on tracks, selecting events, working with menus etc). Hovering over the Vegas app produces a wait-cursor, as expected. I believe PJM has good reason for doing this.
However, I'd like the form NOT to block the main Vegas app. Essentially, running the .js would fire the C# app, and the main thread in Vegas would continue like the .js script is done running. The C# app would be running in a Vegas "owned" thread. This is so the user can interact with vegas and the C# application concurrently.
I can sucessfully achieve letting Vegas continue by spinning off a new thread (via System.Threading) in the EntryFunction. The new thread opens the form with a reference to the original Project. However, my problem is that the passed in Project reference is no longer available after the EntryFunction completes and the .js is done running.
a) Is there anyway to maintain this project reference as passed in by the .js file, or reestablish it?
b) Maybe there is an easier method where the C# app runs outside of vegas. I really haven't investigated my options there yet.
c) Basically, I'm looking for an interactive method to work with Vegas while the script is running.
thank you,
Mike