Failed to get status bar item with key AcSbModeMacro (AutoCAD .Net)

_config.yml

The Problem

I was setting up a new PC and new projects on my AutoCAD 2019 installation but when I tried to debug, this was the strange error that cropped up: You can find a picture of that error above.


Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue ————————— Failed to get status bar item with key AcSbModeMacro

at CAcMgdStatusBar.GetStatusBarItemFromXAML(AcStatusBarItem* pItem)

at CAcMgdStatusBar.GetStatusBarItem(AcStatusBarItem* pItem)

at CAcMgdStatusBar.Insert(CAcMgdStatusBar* , Int32 nIndex, AcStatusBarItem* pItem)

at acedStatusBarServiceIsReady()

at acedStatusBarServiceIsReady()

at Autodesk.AutoCAD.StatusBar.StatusBarService.get_StatusBar()

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)

at System.Windows.Markup.StaticExtension.GetFieldOrPropertyValue(Type type, String name, Object& value)

at System.Windows.Markup.StaticExtension.ProvideValue(IServiceProvider serviceProvider)

at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)

at System.Xaml.XamlObjectWriter.Logic_ProvideValue(ObjectWriterContext ctx)

at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)

at System.Xaml.XamlObjectWriter.WriteEndMember()

at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)

at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)

at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)

at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)

at Autodesk.AutoCAD.StatusBar.StatusBarContainer..ctor()

at Autodesk.AutoCAD.StatusBar.StatusBarService.SetupStatusBarContainer(IntPtr hWnd, Int32 width, Int32 height)

at CAcMgdStatusBarService.SetUpStatusBarContainer(CAcMgdStatusBarService* , CWnd* pWnd)

The Solution?

Turns out that I had copy local set to true on the three key AutoDesk DLLS which the .net API relies on.

Setting them to false, and ensuring that those DLLs were not cached (i.e. delete them if they are) and your problem should vanish.

Hope this helps someone!

Written on August 7, 2018