Good morning/afternoon,
I'm trying to get a script to run that calls a function found in a .dll that I have created. I have placed the compiled .dll file in the Sony Vegas Script Menu, rescanned the menu, etc etc and tried to run the script with no luck. I can successfully create/run scripts without using a .dll, but I would like to be able to create a libarary containing functions for my scripts to call.
From what I can gather, the proper way to set up a script that uses a .dll is like this:
1.) Create your library and c# script that uses functions in the library. Build this file and add the newly compiled .dll to the Vegas Script menu.
2.) Create a secondary script that will actually be ran from the script menu in sony vegas. This script uses the dll created in step 1.
My problem arises when I try to run the scrip in step 2. I get an error saying that the namespace of the .dll I created could not be found, even though it is available in the script menu and included in the script I am running. I also get an error saying that the class I inherited in my script, which is defined in the .dll file, coulld not be found as well.
My .dll file looks like this:
____________________________________________________________________
using ScriptPortal.Vegas;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Windows.Forms;
namespace vegasDLLTest
{
public abstract class SharedEntryPoint
{
Vegas myVegas;
public virtual void FromVegas(Vegas vegas)
{
myVegas = vegas;
}
public void showMessage()
{
MessageBox.Show("message from DLL");
}
}
}
___________________________________________________________________
My script that uses the funciton showMessage found in the .dll looks like this:
using ScriptPortal.Vegas;
using vegasDLLTest;
using System;
using System.Windows.Forms;
using System.IO;
public class EntryPoint : SharedEntryPoint
{
public override void FromVegas(Vegas myVegas)
{
try
{
base.FromVegas(myVegas);
showMessage();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
If you read all this, thanks for sticking through it. If you can help, well, here's a bigger THANKS. This is driving me crazy.