Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Custom Data Connector - Icons

Hi All,

 

I have created a Custom Data connector which works fine for my current needs, but I am unable to update the icon for the connector. It always shows the default icon rather than any of the icons  (added in the project) that I put in the ICONS list in the .pq file.

 

I have checked tha the publish function has the sourceimage property set like this:

 

PBI_Connector.Publish = [
Beta = true,
Category = "Other",
ButtonText = { Extension.LoadString("ButtonTitle"), Extension.LoadString("ButtonHelp")},
SourceImage = PBI_Connector.Icons,
SourceTypeImage = PBI_Connector.Icons
];

PBI_Connector.Icons = [
Icon32 = { Extension.Contents("PBI_Connector24.png")}
];

 

Is there a setting , I am missing? It does not pickup the icon "PBI_Connector24.png"

 

Thanks in Advance

 

Cheers,

AK

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    I stumbled onto the same problem myself this morning when I was rebuilding a connector I was having troubles with.

     

    The solution I found was ensuring the properties of each icon was set to a 'build action' of 'compile' instead of 'content'

     

    Hope this works for you.

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I could be wrong on this, but is it as the format you have should be in the Icon16 batch?

     

    My icons object tends to look like this, which works for me.

     

    My .....20.png slots into the Icon16 set and not the Icon32 set that you hve.

    FacebookForBusiness.Icons = [
        Icon16 = { Extension.Contents("FacebookForBusiness16.png"), Extension.Contents("FacebookForBusiness20.png"), Extension.Contents("FacebookForBusiness24.png"), Extension.Contents("FacebookForBusiness32.png") },
        Icon32 = { Extension.Contents("FacebookForBusiness32.png"), Extension.Contents("FacebookForBusiness40.png"), Extension.Contents("FacebookForBusiness48.png"), Extension.Contents("FacebookForBusiness64.png") }
    ];
    • Anonymous's avatar
      Anonymous
      Not applicable

      I updated the list to this , but still not joy

       


      PBI_Connector.Icons = [
      Icon32 = { Extension.Contents("PBI_Connector40.png"), Extension.Contents("PBI_Connector64.png"), Extension.Contents("PBI_Connector80.png") },
      Icon16 = { Extension.Contents("PBI_Connector16.png"), Extension.Contents("PBI_Connector20.png"), Extension.Contents("PBI_Connector24.png")}
      ];

      • Anonymous's avatar
        Anonymous
        Not applicable

        I stumbled onto the same problem myself this morning when I was rebuilding a connector I was having troubles with.

         

        The solution I found was ensuring the properties of each icon was set to a 'build action' of 'compile' instead of 'content'

         

        Hope this works for you.