Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums VEGAS Pro Command Extension Toolbar Icon

  • Command Extension Toolbar Icon

    Posted by Gary James on June 6, 2011 at 7:35 pm

    I’ve done the research and followed all the suggestions on how to make a PNG file that will appear as the toolbar icon for my Command Extension dll. But nothing seems to work.

    1. I downloaded Paint.Net so I could create and save 32 bit PNG files with alpha channel.
    2. I made my 16×16 pixel file containing my icon image with transparent sections.
    3. I named the file with the same name as my dll with the .png extension.
    4. I placed the .png in “Vegas Application Extensions” sub-directory along with my dll.
    4. The image does not show-up in the Vegas toolbar. Instead, I see the default script icon image.

    I’m running Sony Vegas Pro 9.0e. I downloaded another CE dll that has an associated .png file. This CE dll is named CC_GoTo.dll. But to get the icon to show up in Vegas, the .png file has to be named CC_GoTo.png, not CC_GoTo.dll.png. Looking at the .png file in Paint.Net shows no difference in pixel size or bit depth than my file, but it works and mine doesn’t. In fact, I renamed CC_GoTo.png and changed my image file to CC_GoTo.png. And this worked. My icon image showed up as the icon for the other CE. So I know I can eliminate the .png file itself as the problem.

    I’ve tried every possible combination of dll and .png file naming and nothing helps. I’ve even looked at the Display Name and DockView setting names in my source code without any luck.

    This has left me sitting here scratching my head. Any suggestions are greatfully appreciated.

    Thanks.

    Gary James

    Edward Troxel replied 14 years, 11 months ago 2 Members · 3 Replies
  • 3 Replies
  • Edward Troxel

    June 7, 2011 at 6:30 pm

    CustomCommand myCC = new CustomCommand(CommandCategory.View, “ccname”);

    myCC.DisplayName = “ccname”;
    myCC.MenuItemName = “ccname”;
    myCC.IconFile = “{path}\\ccicon.png”;

    Edward Troxel
    JETDV Scripts

  • Gary James

    June 7, 2011 at 7:09 pm

    Ed,

    You are a lifesaver. Thanks ever so much. This was exactly what I needed to figure out a solution.

    Your example code gave me 99% of the answer.

    CustomCommand myCC = new CustomCommand(CommandCategory.View, "ccname");
    myCC.DisplayName = "ccname";
    myCC.MenuItemName = "ccname";
    myCC.IconFile = "{path}\\ccicon.png";

    All I needed to do was replace the {path} reference with some real code:

    using System.Reflection;
    string path = Path.GetDirectoryName ( Assembly.GetExecutingAssembly ().Location ) + @"\ccname.png";
    myCC.IconFile = path;

    Now I can place my .PNG file in the same subdirectory as my extension dll and everything works perfectly.

    Gary James

  • Edward Troxel

    June 8, 2011 at 1:30 pm

    I put {path} there so you’d know you should put the full path to the image there. Glad I could help.

    Edward Troxel
    JETDV Scripts

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy