TheSwamp

Code Red => .NET => Topic started by: Keith Brown on July 23, 2016, 09:14:56 AM

Title: Ever changing Palette Icon
Post by: Keith Brown 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
Title: Re: Ever changing Palette Icon
Post by: Keith Brown 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?
Title: Re: Ever changing Palette Icon
Post by: nobody on July 24, 2016, 01:33:09 AM
You're doing better than I am...my icons have never appeared lol
Title: Re: Ever changing Palette Icon
Post by: ChrisCarlson 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.