.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Toolbar icons in AutoCAD 2019 replaced by '?'

87 REPLIES 87
Reply
Message 1 of 88
Anonymous
10777 Views, 87 Replies

Toolbar icons in AutoCAD 2019 replaced by '?'

Hi,

 

we're currently in the process of migrating our ACAD extension to the newly released 2019-version of AutoCAD.

 

We have a partial CUI, which contains a custom workspace with some custom PopMenus and Toolbars. At first start of our product, this workspace gets copied programmatically to the main customization file, which is currently loaded (usually ACAD.cuix). This worked nearly flawless since ACAD 2012, sometimes minor tweaks were neccessary, but nothing overly problematic.

 

With ACAD 2019, we have an issue with the toolbarbuttons within in the toolbars. They are always shown with '?'-icons, although there are images defined for those buttons in the CUI:

 

Toolbars, as shown initially directly after start:

 

toolbarbutton_1.PNG

 

toolbarbutton_abi.PNG

 

I figured out the icons are displayed correct, when I toggle the visibility of the toolbar through context-menu:

 

toggle_toolbar.png

 

 

Toolbars after toggling visibility state:

toolbarbuttons_afterToggling.PNG

 

Unforunately, this toggling seems to be neccessary after each new start of AutoCAD.

I already tried to do this toggling programmatically, but it does not work:

 

        public void ToggleGIPSToolbars()
        {
            string menuname = AcadApp.GetSystemVariable("MENUNAME").ToString();

            var cs = new CustomizationSection(menuname);
            cs.Workspaces.BeginUpdate();

            foreach(Workspace item in cs.Workspaces)
            {
                foreach(WorkspaceToolbar wkToolbar in item.WorkspaceToolbars)
                {
                    if (wkToolbar.Display == 0)
                        continue;

                    wkToolbar.Display = 0;
                    wkToolbar.Display = 1;
                }
            }
            cs.Workspaces.EndUpdate();
        }

Is this a known issue or are there any known workarounds?

 

Thank you very much.

 

Best regards,

Matthias

 

87 REPLIES 87
Message 21 of 88
JamesMaeding
in reply to: trazardesign

@trazardesign I think you are trying to tell us the images for the dll need to be included in the RC Data section. I've done menu dll's for a long time for many versions, and tried non-dll images for 2019 also. I don't get what you are saying as the process to make a dll has been the same forever with visual studio.

internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 22 of 88
trazardesign
in reply to: JamesMaeding

Yo he deseado resolver el issue igual que ustedes. Y añadiendo las imágenes en dll RC data section, resolvió el issue, sin la inclusión de LISP o visual LISP. Si encuentran la manera correcta de resolver el problema de "?" en los toolbars, y/o sin modificación de nuestro DLL estaré pendiente, y agradecido. Gracias. Rubén
Message 23 of 88
JamesMaeding
in reply to: trazardesign

well, in case adesk is watching, no one knows how to do what Ruben is saying. Maybe do a screenshot Ruben.

internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 24 of 88
trazardesign
in reply to: JamesMaeding

adjunto imagen muestra del RC DATA section en el DLL
Message 25 of 88

In the AutoCAD program folder you'll find these files: acadbtn.xmx acadbtn_light.xmx.

 

Make a copy of acadbtn.xmx and rename the copy to acadbtn.dll. Then open acadbtn.dll in Visual Studio, and you'll see the RCDATA resources there.

 

acadbtn.xmx is actually a windows resource-only DLL. It should be possible to add .ICO, .BMP and .PNG files as RCDATA to any resource-only .DLL using Visual Studio or another resource editor.

 

(I was going to post a screen-grab but the forum message editor appears to be completely FUBAR, and there's no toolbar).

Message 26 of 88

Gracias, ActivistInvestor, Rubén
Message 27 of 88
ronjonp
in reply to: JamesMaeding

Any update on this? I cannot use AutoCAD 2019 either. I just loaded Bluebeam and it has the same issue2018-04-16_13-49-41.png

Message 28 of 88
trazardesign
in reply to: ronjonp

Sr. Perez. A mi me funcionó añadiendo la sección de RC DATA del DLL, (ya mencionada y ampliado en los POST anterior), y en ella incluyendo los Bitmaps o PNG. Si el software es un ADDONS y Usted es un usuario podría apoyarse en el siguiente LISP copiando en el archivo MNL o un LSP que cargue lo siguiente: (defun reloadtoolbarsfix ( / CXYT MENU MVER NEWPATH MenuList ) (setq newpath (strcase (getvar "program"))) (if (= newpath "ACAD")(progn (setq mver (getvar "ACADVER")) (if (= mver nil)(setq mver "15.0"));; 15.0 es autocad 2000: proteccion (setq mver (substr mver 1 4)) (setq cxyt (distof mver)) (if (= cxyt nil)(setq cxyt 15.0));;proteccion (if (>= cxyt 23.0)(progn (setq Menu "ADDON MENU");;menu del addon (vl-load-com) (setq menu (vla-item (vla-get-menugroups (vlax-get-acad-object)) "ADDON MENU"));;menu del ADD ON (vlax-for MenuBar (vla-get-ToolBars Menu) (if (= (vla-get-Visible MenuBar) :vlax-true) (setq MenuList (cons MenuBar MenuList)) )) (vlax-for MenuBar (vla-get-ToolBars Menu) (vla-put-Visible MenuBar :vlax-false)) (foreach menu MenuList (vla-put-visible menu :vlax-true) ) ));;if ));;progn (princ) ) (reloadtoolbarsfix);;autocad 2019 Nota: cambie ADDON MENU por el de su programa
Message 29 of 88
ronjonp
in reply to: trazardesign

Thanks for the reply. I'm more interested in someone at Autodesk responding and more importantly fixing this problem. Writing code to fix something that has worked flawless for ~15 years is counter productive and a bit frustrating.
Message 30 of 88
JamesMaeding
in reply to: trazardesign

I believe that lisp code causes problems if you have more than 1 toolbar row. Before workspaces, I wrote a tool to remember toolbar locations, and set as needed. It used toolbar visibility like this, turning things off and back on in a particular order, but then adesk broke the mechanism and now everything ends up on one row. So I don't think the code is good enough to implement in real production.

internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 31 of 88
mtucker42MWS
in reply to: JamesMaeding

I was having a similar problem in Autocad 2019. My custom toolbars would show up with random symbols instead of my icons every time I loaded acad. The only way to get my icons to show up was to toggle each toolbar off and on. I fixed it by exporting all my custom .bmp icon files with the image manager to the support folder in Application Data>Roaming. Hope that helps.
Message 32 of 88
hans_mulder
in reply to: trazardesign

I'm also facing this issue bug in AutoCad 2019.0.1

I'm loading partial customization toolbars and menus from .dll

After restarting AutoCAD the cloudy questions icons appear on the custom toolbars (this was no problem since AutoCAD 14)

The icons are shown correct on the pulldown-menus, also customize and CUI show the correct icons.

Changing COLORTHEME to 0 or 1  brings back the icons for the current session, but you have to set it twice to get back the original color scheme.

FIX THIS AUTODESK!

 

Message 33 of 88
sonny3g
in reply to: hans_mulder

I have the found that my users don't have their icon path statement set so that the CUI can find the icons.  I have to go into their Tools/Options/Files and scroll down to their custom Icon location and make sure it points to the correct directory where the custom icons are located.

 

That usually fixes the problem the next time they reboot their computer.

 

Don't know if that will help or not.

 

 

Scott G. Sawdy
scott.sawdy@bluecoyotecad.com
Message 34 of 88
JamesMaeding
in reply to: sonny3g

@sonny3g

Interesting, I never noticed that folder. Good idea but...

That did make the images show for the menu whose images were there, but transparency in .png is not respected which was the whole reason I went from dll to separate images.

Autodesk needs to understand that folder is absolutely not an acceptable way for menus to find images.

For starters, if I have 2 folders of images, say one for each menu, one path is not enough.

Its not new though, as 2018 has it and I never used it before. The support paths are the right way to tell acad where images are.

So that folder is both unworkable as a solution, and even when you do use it the transparency of png is broken.

 The bug remains.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 35 of 88
Anonymous
in reply to: sonny3g

This problem is not restricted to custom icons.  My migrated menu dropped a few commands.  I use the CUI to replace the missing commands, i.e. _pedit, dragging the command from the command list into the toolbar.  The icon appears in the Toolbar Preview but not in the menu.   I have also created some icons for other commands and they have the same problem.  I was surprised that there is no factory icon for the quick leader command as in older versions.  I created the command and used the factory icon for leader instead.  It, too, is a question mark in a cloud in the menu, although it displays correctly in the Toolbar Preview.  In addition, while browsing thru the factory icon choices displayed in the Button Image portion of CUI, several of them are just the ? in a cloud.  AutoCAD bug?  In my opinion, yes.

Icon.PNG

Message 36 of 88
ronjonp
in reply to: hans_mulder


@hans_mulder wrote:

 

...

Changing COLORTHEME to 0 or 1  brings back the icons for the current session, but you have to set it twice to get back the original color scheme.

FIX THIS AUTODESK!

 


Still a kludge .. but does work 🙂

(defun _fix2019toolbars	nil
  (and (= 23 (atof (getvar 'acadver)))
       (repeat 2 (setvar 'colortheme (boole 6 1 (getvar 'colortheme))))
  )
  (princ)
)
(_fix2019toolbars)
Message 37 of 88
Anonymous
in reply to: Anonymous

Under Tools\Options\Customization Files\Custom Icon Location, the folder for custom icons is C:\Users\Craig Snyder\AppData\Roaming\Autodesk\AutoCAD Mechanical 2019\R23.0\enu\support\icons.  However, that folder is empty.  I searched the C drive for the icons by name and found nothing.  The icons show up in the Toolbar Preview so they are being saved somewhere but either they are hidden or they are bundled into some other file. 

Message 38 of 88
Anonymous
in reply to: ronjonp

That works but we shouldn't have to be doing anything like that.

Message 39 of 88
Anonymous
in reply to: ronjonp

After setting Colortheme first to 1, then 0, the missing icons appeared in my menu.  However, there are still several missing icons in the Button Image box in CUI.  They are shrink wrap icons, not customizations.

Message 40 of 88
JamesMaeding
in reply to: ronjonp

Folks, all the workarounds like colortheme and redisplay menus do NOT work if you are using png for the images.

Why would I be so stuck on png - well, for those new at this, you used to be able to use color 192,192,192 in bmp as transparent. Then you could use same images for light and dark theme.

Autodesk removed that ability, and told us to use png with transparency. We did, and it worked in 2018 and below.

But now the transparency is bungled in 2019. It comes out black on some, weird grey on others, but its not even consistent. It makes the buttons look horrible, its not a minor issue.

We got triple whammied with this issue, because we cannot compile png to dll anymore (we can but it does not work....), and we cannot use bmp anymore, and the png transparency is not working even when we do the workarounds.

So can the readers thinking we are just missing something minor, see that its fundamentally broken?

 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report