kduck63 发表于 2022-7-6 22:00:08

Visual Basic 2013 & AutoCAD 20

I wrote a couple of VB applications a few years ago using VB 2008 express and Acad 2012 if memory serves. I am trying to get back into it using VB 2013 express and Acad 2015, but I am not having much luck.
 
 
I have downloaded and referenced the objectarx 2015 files, but I am not able to successfully launch Acad when debugging. Searching for answers on the internet yields results using older versions of both AutoCAD and VB express; do I need to use older versions as well?

BlackBox 发表于 2022-7-6 22:20:58

Greetings from a few hours North.
 
By VB 2013 Express, did you mean VS Community version? There hasn't been a standalone VB Express version since +/- 2010.
 
I use VS 2013 (full version; thank you BizSpark!), to develop for AutoCAD 2012-2016+Alphas.
 
Rather than manually configuring your Solution's Assembly References, remembering to set Copy Local == false, etc... Why not just use the AutoCAD .NET Wizard, which will automagically map the selected Acad.exe (and vertical?) to the StartupApplication XmlNode within .Proj for you?
 
 
 
Cheers

kduck63 发表于 2022-7-6 22:30:07

Yes, I'm using VS Express 2013 and I am settings copy locals to "false". I did download a wizard from the Acad site, but it only installed a template in the C# section of VS; is there a template for visual basic?
 
 
Thank you.

BlackBox 发表于 2022-7-6 22:37:28

 
Well, you should learn C# anyway, as there are substantially more code samples, and fellow programmers that use C# over VB, for it's inherent shortcoming, difficulty with Extension Methods, etc. I too started with VB, quickly learned C#, and haven't looked back.
 
That said, you may want to ensure that you've downloaded the newest Wizard, as I ran into a similar issue some time ago, which has since been fixed:
 
http://forums.autodesk.com/t5/net/autocad-2015-net-wizard/td-p/5169991
 
 
Cheers

kduck63 发表于 2022-7-6 22:50:37

Thank you for the link and your thoughts regarding my issue; i might look into c# if i can't get vb up and running.
 
Thanks again.

BlackBox 发表于 2022-7-6 23:07:23

 
You're welcome, kduck63; I'm happy to help.
 
 
 
Also, this albeit old thread may be of use:
 
http://www.cadtutor.net/forum/showthread.php?69646-Where-to-start-with-.Net
 
 
 
Cheers
页: [1]
查看完整版本: Visual Basic 2013 & AutoCAD 20