Visual Studio built into AutoCAD?? Preferred Language??

Visual Studio built into AutoCAD?? Preferred Language??

sbrusco
Collaborator Collaborator
1,440 Views
24 Replies
Message 1 of 25

Visual Studio built into AutoCAD?? Preferred Language??

sbrusco
Collaborator
Collaborator
Hi Everybody,

I read an article waaaay back in Nov2006 in WorldCAD Access that says

"...Visual Studio Tools for Applications (VSTA), which updates the old VBA (Visual Basic for Applications) for the .NET Framework and the upcoming Visual Studio 2005. Set for release in the third quarter of 2006, VSTA is intended for ISVs such as Autodesk and Dassault Systems seeking to make their products extensible for Visual Studio developers."

What does this mean? Is VS built into AutoCAD? I can find only VBA with VBAMAN and VBAIDE. Is it a compatibility issue?

Now for all you Visual Studio developers out there, is there a preferred language in VS for developing applications for AutoCAD? Why or why not? I know you can work with any of the many VB, C++, C#, J#..., but is there one that is preferred?

Thanks,

Sal

0 Likes
1,441 Views
24 Replies
Replies (24)
Message 21 of 25

Anonymous
Not applicable
>> a more accurate statement would be "replacement language" of choice for professional programmers<<

I'm afraid I would still not agree with that.

Most professional C++ programmers would choose the language that offers them the best of both worlds (native and managed), which is not C#.

That language is called C++/CLI. You can visit MSDN to find out more about C++/CLI and what it is.

Essentially, it is C++ with managed extensions that allow it to be used to build hybrid or 'mixed-mode' applications that are comprised of both managed and native (or 'umanaged') code. Unlike C#, C++/CLI is capable of using native C++ objects from managed code, via something called 'implicit P/Invoke'.

Much of AutoCAD's own managed runtime interop assemblies (acmdg.dll and acdbmgd.dll) is written in C++/CLI or its ancestor, Managed C++, and that is how the 'managed wrappers' for AutoCAD objects interact with the native C++ based ObjectARX objects which they wrap. It would be practically impossible to write the managed ObjectARX wrappers in C#.

>> C++ will continue to live no doubt for some time yet,
>> but much like VBA will be phased out and replaced by
>> applications written in C#.

You would run into Bigfoot in the supermarket before that happens 😉

In all seriousness, for many who may have previously used C++, C# may be a viable alternative for some, but not all things, and it would not be uncommon for a C++ programmer to use both langauges depending on the task. But, there are many things that we take for granted (like for example, photorealistic rendering, solid modeling, multimedia, and so on), that simply cannot be developed in managed code because managed code is far too slow for those things.

For performance-critical applications and frameworks, C++ will continue to be the defacto standard. That is also why much of what we do today in managed code that is performance-critical, is actually just delegating those tasks to native code, under the hood. For example, if you write a drawing or sketch program in managed code, that uses GDI+ to do the actual rendering of the graphics, the code that actually does that is not managed code, it is native code.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
0 Likes
Message 22 of 25

Anonymous
Not applicable
Having waded through these posts can't help feeling there's an undertone of programming snobbery!
0 Likes
Message 23 of 25

sbrusco
Collaborator
Collaborator
Hi Peter,

I have read the "snobbery" you mention, and even in this ng, but i disagree here. What i've seen is two men defending their opinions and i for one appreciate what has been written. Each of them has supported their claims. Maybe you should try to explain your claim instead of just tossing in a relatively insulting comment with no explanation.

Sal

0 Likes
Message 24 of 25

sbrusco
Collaborator
Collaborator
Hi,

Well, i recommended C++ to the programmers and the IT director. After all, i wasn't writing the code, only making recommendations for the specs. After about 1/2 an hour of discussion, the decision was made to use C#.

Thank you all very much for your input, which was a heavy part of the discussion. In the end, i still have to learn another language.

Sal

0 Likes
Message 25 of 25

Anonymous
Not applicable
If you use VB.NET you won't have to learn a new syntax. The only advantage I can see from using C# is you won't be perceived as a hack.
0 Likes