VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD 2008 to AutoCAD 2015 conversion of a VB program

4 REPLIES 4
Reply
Message 1 of 5
mdshameer
627 Views, 4 Replies

AutoCAD 2008 to AutoCAD 2015 conversion of a VB program

Hello,

I wrote a VB program to notify errors on architectural key plans. I developed this on Visual Studio 2010 for AutoCAD 2008 [I am not basically from a programming background. I am a practicing civil engineer]. It was working fine on this configuration.

 

Lately, I tried to configure this for AutoCAD 2015. I tried changing the reference to AutoCAD 2015 type library COM reference [but this does not load interop]. I also tried to make .NET reference to AutoDesk.AutoCAD.Interop and AutoDesk.AutoCAD.Interop.Common in drive/Program Files/Autodesk/AutoCAD2015 folder. I have also tried this on VS 2012. [As os now, both versions Acad2008, Acad2015, VS 2010, VS 2012 coexist on the system]

 

In either case, I keep getting the error messages RPC_E_CALL_REJECTED or Could not activate ACTIVEX Component. When I use .NET reference, the program runs succesfully rarely, but fails to run otherwise. I cannot make out why it runs selectively - say, if I try to run 25 times, the program runs once succesfully.

 

Can anyone help me identify where I am going wrong?

4 REPLIES 4
Message 2 of 5
Gary_J_Orr
in reply to: mdshameer

AutoCAD uses a different version of the underlying Microsoft .Net assemblies.
In addition to updating your references to the new Acad com objects you must also build your app to target the correct MS .NET version (I'm drawing a blank right now on exactly which MS .NET version you need to target/compile for with 2015 but a search should help you find it fairly quickly I believe)

-Gary
Gary J. Orr
(Your Friendly Neighborhood) CADD/BIM/VDC Applications Manager
http://www.linkedin.com/in/garyorr

aka (current and past user names):
Gary_J_Orr (GOMO Stuff 2008-Present); OrrG (Forum Studio 2005-2008); Gary J. Orr (LHB Inc 2002-2005); Orr, Gary J. (Gossen Livingston 1997-2002)
Message 3 of 5
owenwengerd
in reply to: mdshameer

See if this blog post helps.

--
Owen Wengerd
ManuSoft
Message 4 of 5
mdshameer
in reply to: Gary_J_Orr

Thanks Gary,

I had targeted the build to .NET 4.5 for 2015, but still was not working. The problem was due to implementation of ImessageFilter interface. Thanks for the help.

Shameer

Message 5 of 5
mdshameer
in reply to: owenwengerd

Keans blog defenitely helped. The problem was due to call rejection by AutoCAD while startup. I implemented the IMessageFilter and made Retry Call.

 

Thanks very much owenwengerd 

 

Regards

 

Shameer

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

Post to forums  

Autodesk Design & Make Report

”Boost