Book a Demo

Author Topic: MDG_GetProperty and icon  (Read 5021 times)

Slávek Rydval

  • EA User
  • **
  • Posts: 40
  • Karma: +2/-0
    • View Profile
    • homepage
MDG_GetProperty and icon
« on: November 01, 2016, 08:18:25 am »
Hi,

are there any rules related to the icon in dll with the plugin? I've got MDG plugin written in C# (.NET 4.5.2 or higher) and an icon as a resource. When a question to the icon comes I return:


public object MDG_GetProperty(EA.Repository Repository, string PackageGuid, string PropertyName)
{
    switch (PropertyName)
    {
        case "IconID": return System.Reflection.Assembly.GetExecutingAssembly().Location + "#treeview";
        case "Language": return null;
        case "HiddenMenus": return EA.MDGMenus.mgBuildProject & EA.MDGMenus.mgMerge & EA.MDGMenus.mgRun;
        default: return null;
    }
}


Although the package is connected, no icon is shown. Beside the icon I tried also a bitmap without any positive effect. Can you give me any hint? Cheers.

Slávek Rydval

  • EA User
  • **
  • Posts: 40
  • Karma: +2/-0
    • View Profile
    • homepage
Re: MDG_GetProperty and icon
« Reply #1 on: November 06, 2016, 01:37:55 am »
No reply so far, so I prepared minimal solution, maybe someone will try it: https://github.com/SlavekRydval/SparxEAMDGMinimal

Slávek Rydval

  • EA User
  • **
  • Posts: 40
  • Karma: +2/-0
    • View Profile
    • homepage
Re: MDG_GetProperty and icon
« Reply #2 on: November 06, 2016, 03:51:26 am »
Ok, I got it. It seems that the DLL with the icon musn't be a .NET DLL. If I build Win32 DLL, it is working.

[modification]
As for the hidden menu items, it must be obviously return EA.MDGMenus.mgBuildProject | EA.MDGMenus.mgMerge | EA.MDGMenus.mgRun
« Last Edit: November 06, 2016, 03:56:38 am by Slávek Rydval »