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

C# application

6 REPLIES 6
Reply
Message 1 of 7
jjlaseca
269 Views, 6 Replies

C# application

Hello everyone!

I've got some questions

a) I need a .NET application (not dll library) with C# that generates a dwg drawing, is it possible?

b) If it's possible, what I need?

Thanx
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: jjlaseca

A *.dwg file can only be created by AutoCAD (unless you are registered
ObjectDBX, now kown as RealDWG, developer, which requires C++, not .NET
managed code). So, to your question, you can only do it if you/your user
have AutoCAD installed, you app (written in .NET C#/VB.NET or non-.NET
language) just makes/automates AutoCAD to create a *.dwg file.

wrote in message news:5018799@discussion.autodesk.com...
Hello everyone!

I've got some questions

a) I need a .NET application (not dll library) with C# that generates a dwg
drawing, is it possible?

b) If it's possible, what I need?

Thanx
Message 3 of 7
Khalique
in reply to: jjlaseca

Hi jjlaseca,
I am vsual studio 2003 developer though I am not very much familiar with autocad. Recently I started on a project (a stand alone application, executable) that starts autocad, loads a drawing and checks for certain blocks and attributes. I am still struggling with it. However, I can tell you how I am doing it.
We have autocad 2005, visual studio 2003 and .Net 2005 autocad libraries, namely Type Library 2005.
After creating the project you need to add reference to type library. Then you add following statements at the top of the code file.
--
using Autodesk.AutoCAD.Interop;
using Autodesk.AutoCAD.Interop.Common;
--
Here is the code to start the autocad application and load a drawing.
You can write this code in any method that suites your design.
--
private AcadApplication _app;
_app = new Autodesk.AutoCAD.Interop.AcadApplicationClass();
_app.Visible = true;
AcadDocument _doc = _app.Documents.Open(fileName, false, "");
--
This code will give you application and document objects and unlike me, if you are an expert autocad user, you should be able to inspect and understand all the methods and pproperties inside visual studio IDE.
In the Dispose method, you need to close the autocad application
--
if(_app != null)
_app.Quit();
--
Hope this will help.
kr
Message 4 of 7
Anonymous
in reply to: jjlaseca

I suspect "acdbmgd.dll" is part of RealDWG, so .NET should be an option in
that enviroment.

Dan

"Norman Yuan" wrote in message
news:5018964@discussion.autodesk.com...
A *.dwg file can only be created by AutoCAD (unless you are registered
ObjectDBX, now kown as RealDWG, developer, which requires C++, not .NET
managed code). So, to your question, you can only do it if you/your user
have AutoCAD installed, you app (written in .NET C#/VB.NET or non-.NET
language) just makes/automates AutoCAD to create a *.dwg file.

wrote in message news:5018799@discussion.autodesk.com...
Hello everyone!

I've got some questions

a) I need a .NET application (not dll library) with C# that generates a dwg
drawing, is it possible?

b) If it's possible, what I need?

Thanx
Message 5 of 7
Anonymous
in reply to: jjlaseca

Yes, it is part of RealDwg, but you need AutoCAD to use that (use that
INSIDE AutoCAD).

"J. Daniel Smith" wrote in message
news:5018994@discussion.autodesk.com...
I suspect "acdbmgd.dll" is part of RealDWG, so .NET should be an option in
that enviroment.

Dan

"Norman Yuan" wrote in message
news:5018964@discussion.autodesk.com...
A *.dwg file can only be created by AutoCAD (unless you are registered
ObjectDBX, now kown as RealDWG, developer, which requires C++, not .NET
managed code). So, to your question, you can only do it if you/your user
have AutoCAD installed, you app (written in .NET C#/VB.NET or non-.NET
language) just makes/automates AutoCAD to create a *.dwg file.

wrote in message news:5018799@discussion.autodesk.com...
Hello everyone!

I've got some questions

a) I need a .NET application (not dll library) with C# that generates a dwg
drawing, is it possible?

b) If it's possible, what I need?

Thanx
Message 6 of 7
jjlaseca
in reply to: jjlaseca

Thanx a lot. Your tips have solved part of my problem. See u!!
Message 7 of 7
Anonymous
in reply to: jjlaseca

wrote ...

> This code will give you application and document objects and unlike me, if
> you are an expert autocad user, you should be able to inspect and
> understand all the methods and pproperties inside visual studio IDE. In
> the Dispose method, you need to close the autocad application.

Am I missing something or do you need to know C++ even if you are writing
your ObjectARX application in C#. So far every API I've reviewed lists
classes and methods that refer you to the C++ documentation.

If I need to learn the C++ terminology to use the methods, that's OK, but I
keep seeing C++ pointers in the docs and my concern is that they are
expecting you to write "Unsafe Code" blocks within your C# classes to handle
them.

Regards,

Fred Chateau

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost