Exception when open VBE with add-in in Autocad 2019

Exception when open VBE with add-in in Autocad 2019

Anonymous
Not applicable
1,493 Views
3 Replies
Message 1 of 4

Exception when open VBE with add-in in Autocad 2019

Anonymous
Not applicable

Hello All, 

 

An exception occurs when add-in try to create a custom CommandBar. Add-in has a reference to Office.dll.

When I used this add-in program AutoCAD 2013, everything worked fine.

 

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'AdWindows, Version=2017.11.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'AdWindows, Version=2017.11.2.0, Culture=neutral, PublicKeyToken=null'
at AdApplicationFrameHostImp.SetIsApplicationActive(AdApplicationFrameHostImp* , Boolean bActive)
at AdApplicationFrameHost.SetIsApplicationActive(AdApplicationFrameHost* , Boolean bActive)

=== Pre-bind state information ===
LOG: DisplayName = AdWindows, Version=2017.11.2.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Code VBA/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Code VBA/AdWindows.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Code VBA/AdWindows/AdWindows.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Code VBA/AdWindows.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Code VBA/AdWindows/AdWindows.EXE.

 

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3260.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Acdbmgd
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AcdbMgd.DLL
----------------------------------------
adui23
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/adui23.DLL
----------------------------------------
AdUiPalettes
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AdUiPalettes.DLL
----------------------------------------
WindowsBase
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3314.0 built by: NET472REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
PresentationFramework
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
PresentationCore
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System.Xaml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
AdApplicationFrame
Assembly Version: 0.0.0.0
Win32 Version: 2017.11.2.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AdApplicationFrame.DLL
----------------------------------------
AdWindows
Assembly Version: 2017.11.2.0
Win32 Version: 2017.11.2.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AdWindows.DLL
----------------------------------------
WindowsFormsIntegration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll
----------------------------------------
PresentationFramework.Aero2
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero2/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero2.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
accoremgd
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/accoremgd.DLL
----------------------------------------
Acmgd
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/Acmgd.DLL
----------------------------------------
AcWindows
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AcWindows.DLL
----------------------------------------
AcWindows.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcWindows.resources.DLL
----------------------------------------
AcCui
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AcCui.DLL
----------------------------------------
PresentationFramework-SystemXml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll
----------------------------------------
PresentationFramework.Aero
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll
----------------------------------------
PresentationUI
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationUI/v4.0_4.0.0.0__31bf3856ad364e35/PresentationUI.dll
----------------------------------------
System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
PresentationFramework-SystemXmlLinq
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXmlLinq/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXmlLinq.dll
----------------------------------------
AdUIMgd
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AdUIMgd.DLL
----------------------------------------
FeaturedAppsPlugin
Assembly Version: 23.0.0.0
Win32 Version: 23.0.39.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Autodesk/ApplicationPlugins/Autodesk%20FeaturedApps.bundle/Contents/Windows/2019/Win64/FeaturedAppsPlugin.dll
----------------------------------------
PresentationFramework-SystemCore
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemCore/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemCore.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.7.3260.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
UIAutomationTypes
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
----------------------------------------
ContextualTabSelectorRules
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AcWindows.dll
----------------------------------------
AcMrUi
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AcMrUI.DLL
----------------------------------------
AcMrUi.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcMrUi.resources.DLL
----------------------------------------
Microsoft.Expression.Interactions
Assembly Version: 4.5.0.0
Win32 Version: 3.0.40218.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/Microsoft.Expression.Interactions.DLL
----------------------------------------
ManagedMC3
Assembly Version: 10.0.0.0
Win32 Version: 10.0.2.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/ManagedMC3.DLL
----------------------------------------
ClicJsInfoCenter
Assembly Version: 0.0.0.0
Win32 Version: 7.1.4.0
CodeBase: file:///C:/Program%20Files/Common%20Files/Autodesk%20Shared/CLM/V7/MSVC14/ClicJsInfoCenter.dll
----------------------------------------
AcLivePreviewContext
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AcWindows.dll
----------------------------------------
mscorlib.resources
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
AcLayer
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AcLayer.DLL
----------------------------------------
AcLayer.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcLayer.resources.DLL
----------------------------------------
UIAutomationProvider
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll
----------------------------------------
AcCommandToolTips
Assembly Version: 23.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/AcCommandToolTips.DLL
----------------------------------------
AcCommandToolTips.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcCommandToolTips.resources.DLL
----------------------------------------
PresentationFramework.Luna
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3056.0 built by: NET472REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Luna/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Luna.dll
----------------------------------------
AcAeNet.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcAeNet.resources.DLL
----------------------------------------
AcCloudRender.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcCloudRender.resources.DLL
----------------------------------------
AcCustomize.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcCustomize.resources.DLL
----------------------------------------
AcDxWizard.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcDxWizard.resources.DLL
----------------------------------------
AcExportLayoutUI.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcExportLayoutUI.resources.DLL
----------------------------------------
AcInterfere.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcInterfere.resources.DLL
----------------------------------------
AcLayerTools.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcLayerTools.resources.DLL
----------------------------------------
AcMultiLineUi.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcMultiLineUi.resources.DLL
----------------------------------------
AcRecoverAll.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcRecoverAll.resources.DLL
----------------------------------------
AcScaleList.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcScaleList.resources.DLL
----------------------------------------
AcSeamless.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcSeamless.resources.DLL
----------------------------------------
AcUnderlay.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcUnderlay.resources.DLL
----------------------------------------
AcViewTransitionsUi.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcViewTransitionsUi.resources.DLL
----------------------------------------
AdskConnectionPointMgd.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AdskConnectionPointMgd.resources.DLL
----------------------------------------
AcCalcUi.resources
Assembly Version: 0.0.0.0
Win32 Version: 23.0.46.0.0
CodeBase: file:///C:/Program%20Files/Autodesk/AutoCAD%202019/en-US/AcCalcUi.resources.DLL
----------------------------------------

 

Regards

 

0 Likes
1,494 Views
3 Replies
Replies (3)
Message 2 of 4

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

just responding because the thread has no replies ...

 

>> this add-in program

To verify that first ... your "add-in program" is a DVB file that you want to load and run within the AutoCAD VBA Interface?

 

>> When I used this add-in program AutoCAD 2013

Do you mean "using the DVB" is not working or "loading the DVB" crashes?

 

When you say it has references to Office ... do you have the same MS-Office version installed as you had with AutoCAD 2013? Also is Office the same type as AutoCAD, 32bit or 64bit?

 

In general, that "AdWindows.dll" is not found would result in also AutoCAD itself would not start. So it's more an issue of "AdWindows.dll could not be loaded" ... but that message would not appear in VBA, that sounds more like VB.NET (or and .NET language) written app.

 

Some questions are open I guess... 😉

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi Alfred,

thanks for your reply!

 

>To verify that first ... your "add-in program" is a DVB file that you want to load and run within the AutoCAD VBA Interface?

 

No, it's add-in for Microsoft VBA Editor created with VB.Net (HOWTO: Create an add-in for the VBA editor (32-bit or 64-bit) of Office with Visual Studio .NET.)

 

>When you say it has references to Office ... do you have the same MS-Office version installed as you had with AutoCAD 2013? Also is Office the same type as AutoCAD, 32bit or 64bit?

 

In both cases, AutoCAD 64bit, Office 32bit

 

>In general, that "AdWindows.dll" is not found would result in also AutoCAD itself would not start. 

 

AutoCAD "disappears" if I try to open VBA editor when “Load on Startup” for my add-in is true.

 

If I turn off the “Load on Startup” (through the registry) then VBA editor opens normally and I can run my add-in by using Add-In manager.

In this case, no errors occur and AutoCAD does not "disappear".

 

Regards,

Serge

 

 

0 Likes
Message 4 of 4

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> it's add-in for Microsoft VBA Editor created with VB.Net

OK, in that case the most important difference is:

  • VBA for AutoCAD 2013 is based on 32bit (even if AutoCAD works 64bit) and based on VBA 6.x
  • VBA for AutoCAD 2019 is based on 64bit and based on VBA 7.1

 

I have not yet developed extensions for VBAIDE so the above mentioned items are just a guess as I would look first into these differences

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes