.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
10782 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 2 of 88
deepak.a.s.nadig
in reply to: Anonymous

Thank you for reporting.
Can you please share with us a reproducible sample, we can report to Engineering ?

Message 3 of 88
Anonymous
in reply to: deepak.a.s.nadig

Hi Deepak,

 

We also facing this issue.

We have a old CUIX(working fine with AutoCAD 2018) file, where Icons are getting loaded on the fly from the DLL with the same as CUIX file.

 

It does generate mnr/light_mnr file, however when launching AutoCAD 2019 again. The icons are missing from the toolbars.

 

But the same icons can be seen there on Menus

 

Thanks,

Sachin

Message 4 of 88
Anonymous
in reply to: deepak.a.s.nadig

 

 

Hi deepak, 

 

I attached a zipped ACAD.cuix, which contains our custom workspace (named GIPS) with the malfunctioning toolbars (i.e. GIPS:Bearbeiten).

 

You can reproduce the issue, when you load the CUIX with the _menu command.

 

Please consider, that after switching to our workspace, it seems that the icons are working, because the always work after switching workspaces. To reproduce, please switch to our workspace, close & restart AutoCAD, so it does use the last workspace automatically at startup, without initial switching; you then see, that the icons are missing.

 

Best regards,

Matthias

Message 5 of 88
ronjonp
in reply to: Anonymous

Same problem here2018-03-28_6-58-44.png

Message 6 of 88
deepak.a.s.nadig
in reply to: Anonymous

Thank you for sharing and reporting the issue. 

 

We have escalated the issue with the Engineering team. 

Message 7 of 88
ronjonp
in reply to: deepak.a.s.nadig

Here's some quick code I've been using to fix this issue until Autodesk fixes it.

 

(defun fixmenus	(menus / dir file m mg mgs o)
  ;; RJP - 03.30.2018
  (vl-load-com)
  (cond
    ;; If AutoCAD 2019
    ((= 23 (atof (substr (getvar 'acadver) 1 4)))
     (vlax-for x (setq mgs (vla-get-menugroups (vlax-get-acad-object)))
       (setq mg (cons (list (strcase (vla-get-name x)) (vla-get-menufilename x) x) mg))
     )
     (foreach menu menus
       (cond ;;Menu loaded, unload then reload
	     ((and (setq m (assoc (strcase menu) mg))
		   (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-unload (list (last m)))))
		   (not (vl-catch-all-error-p (vl-catch-all-apply 'vla-load (list mgs (cadr m)))))
	      )
	     )
       )
     )
    )
  )
  (princ)
)
;; Usage - list of menus to reload
(fixmenus '("MenuName1" "MenuName2"))

 

 

Message 8 of 88
Anonymous
in reply to: ronjonp

Any update on this?

Message 9 of 88
Anonymous
in reply to: Anonymous

I too have the exact same problem 😞

 

Any solution?

Message 10 of 88
Anonymous
in reply to: Anonymous

 

> Any solution?
 

We didn't find any until today. Maybe you can try to switch to another workspace (one of the standard workspaces) and back programmatically. This definitely works when done by the user in AutoCAD, but will be an ugly solution, since it causes flickering of the UI.

 

@deepak.a.s.nadig

Please provide us information on if and when Autodesk will provide a fix for this issue.

Message 11 of 88
ActivistInvestor
in reply to: Anonymous

As an interim workaround, you can try this:

 

using System;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.Runtime;

[assembly: ExtensionApplication(typeof(Project1.MyApplication))] namespace Project1 { public class MyApplication : IExtensionApplication { public void Initialize() { Application.Idle += idle; } void idle(object sender, EventArgs e) { Application.Idle -= idle; Autodesk.AutoCAD.Internal.Utils.ReloadMenus( (string) Application.GetSystemVariable("WSCURRENT"), false, true); } public void Terminate() { } } }
Message 12 of 88
ActivistInvestor
in reply to: Anonymous

Oops. Wrong API.

 

This is what it should have been:

 

using System;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.Runtime;


namespace Project1
{

   public class MyApplication : IExtensionApplication
   {
      public void Initialize()
      {
         Application.Idle += idle;
      }
      
      void idle(object sender, EventArgs e)
      {
         Application.Idle -= idle;
         Autodesk.AutoCAD.Internal.Utils.SetCurrentWorkspace(
            (string) Application.GetSystemVariable("WSCURRENT"), false, false);
      }

      public void Terminate()
      {
      }
   }

}

 

 

Message 13 of 88

I get the same issue, and I am loading a .mnu fresh to make the cuix. I use a dll for images, attached.

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

Message 14 of 88
kvnbrn
in reply to: JamesMaeding

The same issues occur with Autocad Lt. I have installed on two different computers, both have the same issue.
Message 15 of 88
JamesMaeding
in reply to: kvnbrn

anyone got a support case going on it? I can't use 2019 as is for production.

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

Message 16 of 88
kenkrupa
in reply to: ronjonp

This works (lisp code by rperez) - thank you. Autodesk - PLEASE FIX THIS ASAP!
Message 17 of 88
ronjonp
in reply to: kenkrupa

Glad you could use it 🙂
Message 18 of 88

El dll funciona con la inclusión de bitmap o png en RCDATA, y este resuelve el issue. Verifique con The Engineering Team. Saludos, Rubén
Message 19 of 88
JamesMaeding
in reply to: trazardesign

@trazardesign what do you mean? I think I understand your spanish, but explain more what including RCDATA means.

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

Message 20 of 88
trazardesign
in reply to: JamesMaeding

a) El DLL (resource DLL) tiene la librería de los bitmaps para nuestros toolbars, y ribbon. estos bitmaps (image resource) se encuentran en la sección de Bitmap dentro del DLL. b) Si se añade una sección denominada RC Data (import RC data resource ) en el DLL, y en ella incluye los bitmaps o PNG resuelve el issue.

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