ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Autocad 2005 and Visual Basic.net 2005

1 REPLY 1
Reply
Message 1 of 2
Lance_Turbo
503 Views, 1 Reply

Autocad 2005 and Visual Basic.net 2005

Gday,

Firstly I apologise if these questions have been asked elsewhere but I have searched thoroughly and cannot find them.

My background, I have written an application using vb6 that loads autocad 2005 and extracts various information from a set of drawings and stores the extracted information in an access database. This was done by simply adding the associated autocad and ms access references into the vb6 project and manipulating the objects accordingly.

My problem, I want to try and do the same thing using vb.net in visual studio 2005. I have visual studio 2005 installed but I have not had any exposure to vb.net as yet.

The list:

1)Do I need to download objectarx in order to manipulate autocad 2005 using vb.net? If so where would I find this as on this site I can only find reference to objectarx for autocad2006 or 7 onward.

2)Is it possible to add the same COM references into my vb.net application and use the same methods as I did using vb6? If it is possible would you recommend this?

3)How would you go about solving the problem using vb.net 2005 and autocad 2005? Basically, what is the best way to access autocad 2005 using vb.net 2005?

4)Using vb.net is it possible to add menu bars/buttons to autocad 2005? I could not find a means of doing this using vb6.

5)Does vb.net give me the same degree of freedom (in regard to accessing autocads objects) as say visual C# or visual C++?

6)I have read that accessing autocad 2005 .net api is limited. If so, in what ways?


The only reason I am turning to vb.net is that I want to try and get (a little tiny bit anyway) upto date. Thanks in advance.

Ben
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Lance_Turbo


See comments inline.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Gday, Firstly I apologise if these questions have been asked elsewhere
but I have searched thoroughly and cannot find them. My background, I have
written an application using vb6 that loads autocad 2005 and extracts various
information from a set of drawings and stores the extracted information in an
access database. This was done by simply adding the associated autocad and ms
access references into the vb6 project and manipulating the objects
accordingly. My problem, I want to try and do the same thing using vb.net in
visual studio 2005. I have visual studio 2005 installed but I have not had any
exposure to vb.net as yet. The list:

 

1)Do I need to download objectarx in order to manipulate autocad 2005
using vb.net? If so where would I find this as on this site I can only find
reference to objectarx for autocad2006 or 7 onward.

 

You need to know the difference of ObjectARX API
and COM API (you used in your VB6 application). Since Acad2005, ObjectARX API
also exposes some its APIs as .NET APIs, so that one can use .NET tool (VB.NET
and C# and possible other languages in future) do do ObjectARX programming.
However, the bid difference of doing ObjectARX (C++ or .NET) with COM
automation you have done is the ObjectARX app only runs inside AutoCAD, while
what you have done, baes on your description, is an external app that automate
AutoCAD via COM automation.

 

If you are interested in ObjectARX .NET API
development, you need Acad2006 or later. Acad2005 is the first version that
support .NET API, but very limited, and is not worth the effort to work with.

 

 

2)Is it possible to add the same COM references into my vb.net
application and use the same methods as I did using vb6? If it is possible
would you recommend this?

 

 

Yes, you can still do the very similar thing with
VB.NET as you did with VB6. If you automate AutoCAD from external app, it is
not a matter of recommending or not, it is the way you have to use. However,
automating AutoCAD from external app could have many issues, depending on the
process, and very often a solution run inside AutoCAD (VBA/LISP/ObjectARX) can
does the same thing more smoothly, user-friendly.

 

 

3)How would you go about solving the problem using vb.net 2005 and
autocad 2005? Basically, what is the best way to access autocad 2005 using
vb.net 2005?

 

 

Solving what problem? Best way for what? It all
depends on the issues in hand. If you mean doing exteenal AutoCAD automation
with VB6 or VB.NET, there is notmuch difference. But if you are still a bit
green on .NET stuff, sticking with VB6 might be better. However, If the
process of controling Acad is quite complicated, COM automating from
external app can hardly be a good solution, redardless development landuage
(VB6/VB.NET/C#) and Acad version (2005 or other version).

 

 

4)Using vb.net is it possible to add menu bars/buttons to autocad 2005? I
could not find a means of doing this using vb6.

 

 

If you do it via COM API from external app,
VB.NET and VB6 can only do the same thing. Yes, it is possible to change Acad
menu/toolbar via COM API automation.

 

 

5)Does vb.net give me the same degree of freedom (in regard to accessing
autocads objects) as say visual C# or visual C++?

 

 

It is not what language gives you more freedom,
in term of Acad programming. It is which Acad API your development
against to decide how much freedom you have to control Acad.

 

 

 

6)I have read that accessing autocad 2005 .net api is limited. If so, in
what ways? The only reason I am turning to vb.net is that I want to try and
get (a little tiny bit anyway) upto date.

 

 

If you want to catch up the latest technology in
Acad programming, then go for Acad ObjectARX .NET API. As afore-metioned,
you'd better get Acad2006 or later and download .NET API labs from autodesk's
site to get started.

 

 

Thanks in advance. Ben

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

Post to forums  

Autodesk Design & Make Report

”Boost