Visual Studio, VB2008 and C++

Visual Studio, VB2008 and C++

Anonymous
Not applicable
599 Views
6 Replies
Message 1 of 7

Visual Studio, VB2008 and C++

Anonymous
Not applicable
Hey, without asking questions where someone gives away answers to save work on my part, does anyone access AutoCAD Customizations with Visual Studio using VB2008 and C++? Seems VBA is limited or difficult in these areas. Enabling the References to Autodesk Software with the Visual Studio Developer Tools, does this buy a developer more avenues and tools for customizing the AutoCAD software?

I posted the question before and admit I do not see why accessing control of the AutoCAD Command Line is so cumbersome. It should have been inheritant in AutoCAD VBA from the get go. Any comments? It should be something simply like .GetCommandLine. If you gave away the answer I think I would get a long code segment for this type of control. Can someone point me in the right direction without having to spend time looking for it yourself. Just tell me where to look and I will do the rest?

THX,
Dan McRae
mcraed47@calcutech.net
0 Likes
600 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Hi Dan,

This is a VBA newsgroup. VBA can write to the command line and it can
use the SENDCOMMAND process to run AutoCAD commands. All you need to do
is work out what the string you send is. But SENDCOMMAND runs
asynchronously and so if you send commands which take significant time
to process your program is sure to get confused.

With the advent of 64 bit computing, it is most unlikely that anyone
will be expanding the functionality of VBA, so why worry about what it
can and can't do - or how it does it, just move on to your preferred
languages.

To develop with Visual Studio.NET you are more likely to find expertise
and guidelines in the newsgroup specifically nominated for that purpose.

Ditto with C++ in the ARX newgroup


Regards,


Laurie Comerford

dan.mcrae wrote:
> Hey, without asking questions where someone gives away answers to save work on my part, does anyone access AutoCAD Customizations with Visual Studio using VB2008 and C++? Seems VBA is limited or difficult in these areas. Enabling the References to Autodesk Software with the Visual Studio Developer Tools, does this buy a developer more avenues and tools for customizing the AutoCAD software?
>
> I posted the question before and admit I do not see why accessing control of the AutoCAD Command Line is so cumbersome. It should have been inheritant in AutoCAD VBA from the get go. Any comments? It should be something simply like .GetCommandLine. If you gave away the answer I think I would get a long code segment for this type of control. Can someone point me in the right direction without having to spend time looking for it yourself. Just tell me where to look and I will do the rest?
>
> THX,
> Dan McRae
> mcraed47@calcutech.net
0 Likes
Message 3 of 7

Anonymous
Not applicable
Dan,
For the tightest integration and deepest access into AutoCAD, you'll need to
access its C++ API, ObjectARX. Much of that API is wrapped and exposed in a
friendlier .NET API. The COM API is yet another option, but accessing it
via VBA is a dead end; drop VBA like a prude prom date. There is also the
VisuaLISP API that gives you extraordinarily good access to the command
system, but it is an aging API and it's access to the world outside of
AutoCAD is limited. Each of those API's have a large following and many are
versed in more than one.

All of those API's have related discussion groups here on the Autodesk
server, the AUGI site has discussion groups, theswamp.org is a great site,
and Kean Walmsley maintains a good blog. That should give you a good
starting point. Good luck.
--
Bobby C. Jones
http://bobbycjones.spaces.live.com
0 Likes
Message 4 of 7

Anonymous
Not applicable
{quote}

I do not see why accessing control of the AutoCAD Command Line is so
cumbersome

{quote}

VBA applications by default, run in the application execution context, where
synchronous access to the command line is not possible.

.NET code that runs in the application context also has the same problem,
but because you can easily define real AutoCAD commands in .NET, that do not
run in the application context, they can drive the command line
synchronously, just like LISP applications do, but doing that requires
access to some undocumented APIs that you can find out more about by reading
the .NET newsgroup.

You can also download these to control the command line synchronously from
.NET:

http://www.caddzone.com/CommandLine.cs
http://www.caddzone.com/CommandLine.vb


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6268054@discussion.autodesk.com...
Hey, without asking questions where someone gives away answers to save work
on my part, does anyone access AutoCAD Customizations with Visual Studio
using VB2008 and C++? Seems VBA is limited or difficult in these areas.
Enabling the References to Autodesk Software with the Visual Studio
Developer Tools, does this buy a developer more avenues and tools for
customizing the AutoCAD software?

I posted the question before and admit I do not see why accessing control of
the AutoCAD Command Line is so cumbersome. It should have been inheritant in
AutoCAD VBA from the get go. Any comments? It should be something simply
like .GetCommandLine. If you gave away the answer I think I would get a long
code segment for this type of control. Can someone point me in the right
direction without having to spend time looking for it yourself. Just tell me
where to look and I will do the rest?

THX,
Dan McRae
mcraed47@calcutech.net
0 Likes
Message 5 of 7

Gary_J_Orr
Collaborator
Collaborator
And here I thought that the name of this group was "Visual Basic Customization" not "Visual Basic for Applications Customization".

AutoCad's .Net toolset is cool and all, but sometimes you still need to build a function that uses "traditional" AutoCAD Class libraries. These libraries can be loaded into Visual Studio 2008 (which is a "Suite" of programming interfaces that include C++, C# and Visual Basic, aka VB) and used from there instead of using the old VBA (and it's parent Visual Basic 6) to access those same libraries and perform those same functions.

Visual Studio .Net does not exist. Visual Studio 2008 does and it uses the Microsoft .Net technologies pretty much by default, but it does not inherently use the AutoCAD .Net toolset, nor does it force the usage of such. If a person goes to the group that you suggested and posts a question about using any of the "traditional" AutoCAD Class Libraries from within Visual Basic then they are told to go to the VB group (which is here)...

If a person is developing an application that stands by itself or that runs within another application, and they are using Visual Basic as thier choice of programming tools to build thier dll's with, then this is the closest match that can be found for finding help...

Gary
Gary J. Orr
(Your Friendly Neighborhood) CADD/BIM/VDC Applications Manager

aka (current and past user names)
GaryOrrMBI (MBI Companies 2014-Present), 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)
0 Likes
Message 6 of 7

Anonymous
Not applicable
Hi Gary,


The name of this group is "VBA". (See screen grab from Thunderbird
interface) Make what you like of that.

Perhaps slackly I used the terminology Visual Studio.Net to distinguish
that I was referring to the NET based MS programming languages as
distinct from the old VB6 based languages.

Despite the few people who suggest referring COM API functions from the
NET newsgroup to the VBA newsgroup, the reality is that NET users only
ever get useful advice from people who understand NET and they are more
likely to be found in the NET NG.

When this type of question comes here, it is inevitably ignored, or
answered by the people who suggested the OP repost.


Regards,


Laurie Comerford


Gary_J_Orr wrote:
> And here I thought that the name of this group was "Visual Basic
> Customization" not "Visual Basic for Applications Customization".
>
> AutoCad's .Net toolset is cool and all, but sometimes you still need to
> build a function that uses "traditional" AutoCAD Class libraries. These
> libraries can be loaded into Visual Studio 2008 (which is a "Suite" of
> programming interfaces that include C++, C# and Visual Basic, aka VB)
> and used from there instead of using the old VBA (and it's parent Visual
> Basic 6) to access those same libraries and perform those same functions.
>
> Visual Studio .Net does not exist. Visual Studio 2008 does and it uses
> the Microsoft .Net technologies pretty much by default, but it does not
> inherently use the AutoCAD .Net toolset, nor does it force the usage of
> such. If a person goes to the group that you suggested and posts a
> question about using any of the "traditional" AutoCAD Class Libraries
> from within Visual Basic then they are told to go to the VB group (which
> is here)...
>
> If a person is developing an application that stands by itself or that
> runs within another application, and they are using Visual Basic as
> thier choice of programming tools to build thier dll's with, then this
> is the closest match that can be found for finding help...
>
> Gary
0 Likes
Message 7 of 7

Gary_J_Orr
Collaborator
Collaborator

See what the Web site calls it in my attached clip.

"NET users only
ever get useful advice from people who understand NET and they are more
likely to be found in the NET NG."

In my experience the NET group focuses thier answers on the AutoDesk .Net API and usually see any reference to COM interop as a topic for here.

It's really hard for someone that uses Visual Basic in Visual Studio 2008 and is accessing the COM Interop to find any help.
I know, I'm in the same boat. I gave up trying to find help here because of it (even though I keep coming back reading and hoping for better).

Gary

Gary J. Orr
(Your Friendly Neighborhood) CADD/BIM/VDC Applications Manager

aka (current and past user names)
GaryOrrMBI (MBI Companies 2014-Present), 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)
0 Likes