New Member
1 Posts
0 Kudos
Registered: ‎03-12-2012
Post 1 of 2

AutoCAD Line Object, Draw lines

526 Views, 1 Replies
03-16-2012 07:25 AM

Hi Everyone,


I have a client who would like me to develop an application that will do the following:


Open AutoCAD

Load an empty drawing

Define a line in memory while specifying it's start and end points, then add it to the DWG file.


I also need to open existing drawings, select a block of data (ie: 4 lines that make a rectangle, etc) then scale the drawing down and place it on the drawing in a set location.


Once the data has been drawn to a DWG the file is saved.


Where (& how) can I create a line object in memory, draw it - and refernce it by it's name/ID etc.


ie:  Dim line as AutoCADLine   - where AutoCADLine is the type


I've read there's a few ways to work with autocad - I'm using the interops DLL's but it doesn't appear that it has the ability to do what I need.


I'd really appreciate it if someone could point me in the correct direction for some C# code that draws pre-defined objects onto the drawing surface.  Also, reading parts of a drawing from a DWG file is critical as well...





*Expert Elite*
1,569 Posts
171 Kudos
Registered: ‎10-08-2008
Post 2 of 2

Re: AutoCAD Line Object, Draw lines

03-16-2012 07:51 AM in reply to: Lvcien

See on-line docs for more please





Post to the Community

Have questions about Autodesk products? Ask the community.

New Post