@jetdv Hi Edward. Could you help me again? I have a block of code in my custom command that returns a plugin's UniqueID from a user input string. See below.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using ScriptPortal.Vegas; namespace MyCustomCommand { public partial class MyTab4 : UserControl { Vegas myVegas = null; public MyTab4(Vegas vegas) { myVegas = vegas; InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { string userInput = textBox1.Text; if (userInput.Length > 0) { PlugInNode plugin = myVegas.VideoFX.GetChildByName(userInput); string UID = plugin.UniqueID; MessageBox.Show("FX UniqueID for " + userInput + " is " + UID); } else { MessageBox.Show("You must enter a plugin name"); } } catch (Exception ex) { MessageBox.Show("Plugin name not recognised. Check that the spelling is correct"); } } } }
This works perfectly and displays the correct UniqueID for the video plugin entered in the userInput field. However, if I replace the VideoFX in the PlugInNode statement with AudioFX, the plugin can't be found and the code exits.
Would you know why the audio plugin's UniqueID can't be found using this method? Or am I doing somethng wrong?
Thanks in advance.