Author Topic: Ever changing Palette Icon  (Read 1744 times)

0 Members and 1 Guest are viewing this topic.

Keith Brown

  • Swamp Rat
  • Posts: 601
Ever changing Palette Icon
« on: July 23, 2016, 09:14:56 AM »
I have written a plugin that includes a palette and a palette icon.  Sometimes when docking the palette the icon shows the image that I have assigned and other times it shows a different icon.  This only occurs when you are showing the icons on the palette sidebar and not text.  I am running the plugin while also running Integraphs CadWorx Plant Professional.  It is there icon that shows up intermittently.  Myself and all of my other testers are running several (approx 8.) different plugins created in house that do not have this problem.  Just this one. 


Any suggestions or ideas?  No where in my resources do i have the offending icon that is showing up intermittently.


Here is the standard code that I am using to assign the icon to the palette set.


Code - C#: [Select]
  1. StressWorxCommands.PaletteSet.Icon = My.Resources.StressworxIcon_16x16
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

Keith Brown

  • Swamp Rat
  • Posts: 601
Re: Ever changing Palette Icon
« Reply #1 on: July 23, 2016, 11:31:03 AM »
I believe that at one time I did not have an icon assigned to this palette so AutoCAD assigned it one.  After I created the icon is it possible that sometimes autocad gets "confused" and uses the previous icon?  The palette has a guid assigned to it that has not changed since the beginning.  Do you think assigning a new guid could clear up the problem?
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: Ever changing Palette Icon
« Reply #2 on: July 24, 2016, 01:33:09 AM »
You're doing better than I am...my icons have never appeared lol

ChrisCarlson

  • Guest
Re: Ever changing Palette Icon
« Reply #3 on: July 25, 2016, 12:11:52 PM »
If a command is loaded to the pallete without an image specified, it should remain blank, keyword should.

When the wrong icon is shown, can you manually edit the icon image properties within AutoCAD?

I'm assuming all of you have loaded that pallete prior to specifying the image? I'm curious if you manually set it to the correct image if that resolves it for future loads / reloads.