Use of AutoLoadCommand in Extension?

Mojojojo wrote on 6/18/2010, 10:55 AM
I am writing a small extension as a wrapper for our in-house editing tools, and while I can get the windows, buttons, etc, to come out correctly and get the extension form to come up docked, I can't get it to start with Vegas.

I know that there's a way to use "AutoLoadCommand" to bring it up, but the SDK is a little obtuse for me; this is my first experience with C#. Can anybody offer an example or explain?

Thanks in advance,
CFontenot13

Comments

jetdv wrote on 6/18/2010, 12:08 PM
You do it something like this...


CustomCommand tst = new CustomCommand(CommandCategory.View, "test");



void HandlePICmdInvoked(Object sender, EventArgs args)
{
if (!myVegas.ActivateDockView("ettst"))
{
etPI = new customcommand();
etPI.AutoLoadCommand = tst;
etPI.PersistDockWindowState = true;
txt.Checked = true;
myVegas.LoadDockView(etPI);
}
}
Mojojojo wrote on 6/21/2010, 12:40 PM

Awesome, thank you!

Seems like with every build, I have to re-enable the extension to get it to autoload, but that's a very small price to pay for the ability to have it pop open like this.

Thanks again, Mr. Troxel!