Joro-- Posted August 27, 2014 Posted August 27, 2014 Hello all, does anybody know whether the VBA Macros work with AutoCad 2015? The problem is that my Autocad at work will be changed from 2013 to 2015 and I don't know will I be able to use the macros that I currently use with 2013. For 2013 I use the VBA Enabler, but I have heard that there are no Enablers for 2014 and 2015 and there is smth like VBA7...??? Thanks in advance for any info. Joro Quote
BlackBox Posted August 27, 2014 Posted August 27, 2014 FWIW - I am not aware of major changes to the ActiveX API (for Visual LISP), but can tell you that there are version-specific changes to 2015 .NET API that require apps to be recompiled. Methinks you're going to have to install it and test each of your macros just as you would for any other version change. HTH Quote
BIGAL Posted August 28, 2014 Posted August 28, 2014 If any of your routines open a specific database inside Autocad like CIV3D AeccXUiland you will need a new version number for 2015 (if ((lambda (vrsn) (cond ((vl-string-search "R17.2" vrsn) (setq appstr "6.0")) ;09 ((vl-string-search "R18.0" vrsn) (setq appstr "7.0")) ;10 ((vl-string-search "R18.1" vrsn) (setq appstr "8.0")) ;11 ((vl-string-search "R18.2" vrsn) (setq appstr "9.0")) ;12 ? ((vl-string-search "R19.0" vrsn) (setq appstr "10.0")) ;13 ((vl-string-search "R19.1" vrsn)(setq appstr "11.0"));;2014 ((vl-string-search "R20.0" vrsn)(setq appstr "12.0"));;2015 ((alert "This version of C3D not supported!")) ) ) (vlax-product-key) ) (strcat "AeccXUiLand.AeccApplication." appstr) Quote
Tyke Posted August 28, 2014 Posted August 28, 2014 Since AutoCAD 2014 AutoCAD uses the VBA engine VB7.1 which is not 100% compatible with the preceeding VB6 version. 32 bit controls are no longer useable so macros using such controls will need to be modified, but basically all of your macros can be used. A VBA enabler is available for AutoCAD 2015. But as BlackBox said you should test ALL of your existing macros on 2015. IMO you should consider transferring all of your macros to .NET. Quote
BlackBox Posted August 28, 2014 Posted August 28, 2014 IMO you should consider transferring all of your macros to .NET. 1+ To build on Tyke's apt comment, while you may think it easiest to start learning VB.NET for the relatively common syntax of VBA (I did the same when stepping up from Visual LISP), you may find it much easier to instead learn C# due to the abundance of good source code samples available, and it really helps you mentally compartmentalize the distinction between VBA and VB.NET which bites a lot of folks in the end so-to-speak. Cheers Quote
Tyke Posted August 28, 2014 Posted August 28, 2014 After many years of writing programs in VB.NET and VBA I have just started out writing in C# and find it no problem what soever. BlackBox's comment is very true, there are so many more examples out there for C#. You can use the free express editions of Visual Studio to get you started with .NET. Quote
BlackBox Posted August 28, 2014 Posted August 28, 2014 After many years of writing programs in VB.NET and VBA I have just started out writing in C# and find it no problem what soever. BlackBox's comment is very true, there are so many more examples out there for C#. *Tips hat* You can use the free express editions of Visual Studio to get you started with .NET. That's how I got started with .NET... Now I find myself to be published at Autodesk Exchange, and a new Microsoft BizSpark member ... Gosh darn it, the song "Handlebars" by Flobots is stuck in my head now. Cheers Quote
RICVBA Posted August 28, 2014 Posted August 28, 2014 some months ago I cheated my nickname and decided to give .NET development a try for my autocad customizitation needs. so I started learning C# and VS with no regard to autocad, as they wisely told me to do. now I'm somehow ready to dirty my hands with an autocad application but I'm still mesmerized by the VS, .NET Framework, .ARX and .NET Wizards, SDK and Autocad versions mix issue. I begun and try to see it through (http://www.theswamp.org/index.php?topic=10369.15) but I eventually did not succeed. not even remember why. just gave it up and went on concentrating on C# and hoping my company would upgrade Autocad. Now my company agreed on installing VS Express 2012 or 13, but still stuck on Autocad 2010. And I'd be willing to start that again from where I left it. Maybe you could give me some more hints as to what version and in which order have I to install of AutocadNET Wizard, ObjectARX Wizard, and whatever else should there be useful. thank you thank you Quote
BlackBox Posted August 28, 2014 Posted August 28, 2014 some months ago I cheated my nickname and decided to give .NET development a try for my autocad customizitation needs.so I started learning C# and VS with no regard to autocad, as they wisely told me to do. now I'm somehow ready to dirty my hands with an autocad application but I'm still mesmerized by the VS, .NET Framework, .ARX and .NET Wizards, SDK and Autocad versions mix issue. I begun and try to see it through (http://www.theswamp.org/index.php?topic=10369.15) but I eventually did not succeed. not even remember why. just gave it up and went on concentrating on C# and hoping my company would upgrade Autocad. Now my company agreed on installing VS Express 2012 or 13, but still stuck on Autocad 2010. And I'd be willing to start that again from where I left it. Maybe you could give me some more hints as to what version and in which order have I to install of AutocadNET Wizard, ObjectARX Wizard, and whatever else should there be useful. We'd be happy to help... Try reading through some of the recent threads in the .NET forum, as you're not alone. I have a submittal, and some server upgrades to spec out today, and will check back as time permits, should someone smarter than I not have already helped you. Cheers Quote
Joro-- Posted August 29, 2014 Author Posted August 29, 2014 Since AutoCAD 2014 AutoCAD uses the VBA engine VB7.1 which is not 100% compatible with the preceeding VB6 version. 32 bit controls are no longer useable so macros using such controls will need to be modified, but basically all of your macros can be used. A VBA enabler is available for AutoCAD 2015. But as BlackBox said you should test ALL of your existing macros on 2015. IMO you should consider transferring all of your macros to .NET. Tyke, Thanks for your explanation. In my macros I use codelines like Dim L as AcadLine Or Dim B as AcadBlockReference With the corresponding syntaxis. Do you think, that this would newd to be actualized everywhere in my code. Thid is infact no real library referencing. As to my underszanding the syntax of vba doesnt change? Quote
BlackBox Posted August 29, 2014 Posted August 29, 2014 Thanks for your explanation. In my macros I use codelines like Dim L as AcadLine ''Or Dim B as AcadBlockReference With the corresponding syntaxis. Do you think, that this would newd to be actualized everywhere in my code. Thid is infact no real library referencing. As to my underszanding the syntax of vba doesnt change? VBA (ActiveX COM API) is VBA (ActiveX COM API) regardless of version, so the syntax remains the same... It's changes to the Object Model you need to account for, during migration. As an example, when one Object's Properties, Methods, and Events is moved to different assembly reference than it was in previous version... Probably not as common in COM, as it is in .NET API since the advent of Core Console. Quote
RICVBA Posted August 30, 2014 Posted August 30, 2014 We'd be happy to help... Try reading through some of the recent threads in the .NET forum, as you're not alone. I have a submittal, and some server upgrades to spec out today, and will check back as time permits, should someone smarter than I not have already helped you. Cheers I got my "Hello World" kick off running. But where can I get the Autocad API reference, as I could with "AutoCAD ActiveX and VBA Reference"? There I could get extensive explanations and examples too. I already went through http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html but it's much less wordy and, mainly, seems to lack a lot of references. I need to get at help/reference for all of the classes, and their properties and methods, that I can see in the object browser for AcdbMgd.dll and the likes. Quote
SEANT Posted August 31, 2014 Posted August 31, 2014 A full listing of the ARX APIs, both managed (.Net) and native, can be found here: http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=785550 These docs do not contain examples - as did the VBA Reference - but do provide fully qualified namespace listings to use via web search. Chances are, a pertinent example is out there. Quote
RICVBA Posted August 31, 2014 Posted August 31, 2014 thank you Seant so this means there's no chance to reach the help relevant topic by pressing F1 while coding in the IDE, rather I have to open those "chm" files separately, isn't it? Quote
SEANT Posted August 31, 2014 Posted August 31, 2014 See if the option on this page help in that regard: http://usa.autodesk.com/adsk/servlet/index?id=1911627&siteID=123112 Quote
Joro-- Posted September 3, 2014 Author Posted September 3, 2014 Hello, As far as I understand the most of the things remaim the same in VBA7.1. Can you post several code lines with changes comparing to old VBA. 10x Quote
Tyke Posted September 3, 2014 Posted September 3, 2014 Almost all of the things in VB7.1 remain the same as in the previous VB6. The syntax and functions have not changed at all (as far as I am aware). But all of the 32 bit controls are no longer available, no timer control, no file dialogs for opening and saving files, the SHELL function doesn't seem to work any more - or at least in two of my programs. No big things really as you can build the controls yourself and use the Windows API for your file operations. As BlackBox quite rightly said, test all of your macros now in their current form. If some don't work try fixing them yourself (it's the best way to learn) and if you get stuck post your problem here. Google will come up with loads of answers for you. You will be pleasantly surprised how many of your macros will still run under VB7.1. Good luck. Quote
BlackBox Posted September 3, 2014 Posted September 3, 2014 As BlackBox quite rightly said, test all of your macros now in their current form. If some don't work try fixing them yourself (it's the best way to learn) and if you get stuck post your problem here. Google will come up with loads of answers for you. You will be pleasantly surprised how many of your macros will still run under VB7.1. Good luck. *Tips hat* ... Cheers, Tyke. @Joro--, Do you have access to the VBA source code, or is it password locked? I only ask as I found a way to 'unlock' VBA source code while at my last employer. [PeterGriffinVoice] Ehhhehehehe [/PeterGriffinVoice] Cheers Quote
Joro-- Posted September 4, 2014 Author Posted September 4, 2014 Txanks Tyke, This is actually what I really needed. I will definitely check all my macros. The important thing was that there are really not many things to change, because I habe made some pretty long VBA Macros (tausends of rows) an it would tale really long to repair them. And then I would prefer to stay with the old Autocad. BlackBox, yes I have the passwords for the code Regards Joro Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.