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:
I figured out the icons are displayed correct, when I toggle the visibility of the toolbar through context-menu:
Toolbars after toggling visibility state:
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
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
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).
Any update on this? I cannot use AutoCAD 2019 either. I just loaded Bluebeam and it has the same issue
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
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!
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.
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
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.
@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)
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.
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.
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.