Questions tagged [autocad]

Drafting and design software.

AutoCAD is produced by Autodesk Inc. It is a base product for many of their software offerings that are designed for specific tasks such as architectural, mechanical and civil drafting. AutoCAD is customizable by means of several APIs.

  • Autolisp - A flavor of LISP.
  • VBA - Microsoft VBA became available as an API during the release of AutoCAD 14 prior to 2000. Autodesk has warned that VBA will not be supported in releases after 2012... but it is, even in native 64-bit for the 1st time in v2014.
  • Managed .NET - A managed .NET API is currently the customization platform of choice for many AutoCAD programmers. Of the .NET languages C# is currently the most popular but VB.NET has a stronger-than-usual following because of AutoCAD's VBA history.
  • the JavaScript API was introduced in v2014.
  • ObjectARX/ObjectDBX - A native C++ based API that became available during the release of AutoCAD 13. Less popular than the .NET API because it requires writing much more code and more complex code to accomplish most tasks. Some types of projects (complex custom objects) can only be done via this API.

Autodesk also licenses two stand-alone AutoCAD environments to develop on top of, RealDWG and AutoCAD OEM. OEM has a user interface and RealDWG does not. The licensing model for each is very different - OEM is licensed as a percentage of each sale, RealDWG has fixed license costs.

There is an independent reverse-engineered library that is compatible with AutoCAD made by the Open Design Alliance. Compatibility can lag a little when Autodesk does its 3-yearly binary shuffle and changes the file format. AutoCAD v 2013 changed the application's internal structure, as well as the file format.

The ODA is not open-source nor is it free (as in beer but it is free as in speech) and is not necessarily cheaper than Autodesk's licensing, depending on if / how many sales you make. ODA's Teigha is used as the basis for products like IntelliCAD etc. You can build stand-alone applications on it.

Resources

1207 questions
27
votes
1 answer

How to read lines from Blocks in Kabeja?

I am using Kabeja to read data from an DXF file. I can read all the Lines and Polylines without any issues. However, I am not able to find the Lines from a Block. I can find the Block along with the Insert entity that places the Block in the…
Doug
  • 279
  • 2
  • 4
25
votes
7 answers

Open source cad drawing (dwg) library in C#

Anyone knows of an open source DWG (autocad drawing) library in C#?
Mac
  • 2,607
  • 7
  • 35
  • 44
19
votes
8 answers

Reading .DXF files

Does anyone know of source code, ideally in C# or similar, for reading .DXF files (as used by AutoCAD etc)? If not code, then tables showing the various codes (elements / blocks / etc) and their meanings? I am writing a reader myself, and have dead…
Joel in Gö
  • 7,042
  • 6
  • 45
  • 76
17
votes
2 answers

DXF Parser : Ellipses angle direction

I wrote my own ASCII DXF file parser and I encounter a problem with ellipses in some particular documents. It seems that there is no "Group Code" defining the angle direction (Clockwise or Counterclockwise) for Start and End Parameters. In most…
ingham
  • 1,584
  • 14
  • 30
16
votes
2 answers

Developing plugins for AutoCAD?

I'm thinking about starting to develop a plugin for AutoCAD, but I have absolutely no knowledge of the field. How does the plugin system work? What are the licensing terms? What programming platforms are available? I'd really appreciate if somebody…
static_rtti
  • 46,349
  • 44
  • 123
  • 180
15
votes
3 answers

Why am I getting the "LoaderLock was detected" warning when debugging?

I'm developing an add-on for AutoCAD 2009. The project output is a class library. When I attempt to debug and load the class library, I get this "LoaderLock was detected message." I've been writing these add-ons for awhile and this is the first…
DenaliHardtail
  • 24,560
  • 51
  • 134
  • 216
14
votes
2 answers

VBA Looping through a Collection

I have a collection of files that I selected in the SelectManyFiles function and I want to run multiple private subs on each Drawing in the collection function. Here's my code: Sub Main() Dim Drawing As Object Dim Drawings As Collection Set…
GhostTiger
  • 153
  • 1
  • 1
  • 5
14
votes
3 answers

Debugging what this LISP Virus is doing

My firm has been hit by an AutoCAD virus that is deleting and replacing our acaddoc.lsp with the routine below. I'm an architect and not exactly sure what this is doing by the repetitive "find" and "deletes". Questions What is this replacing the…
user231577
13
votes
4 answers

What are CAD apps written in, and how are they organized?

What are CAD applications (Rhino, Autocad) of today written in and how are they organized internally ? I gave as an example, Autocad and Rhino, although I would love to hear of other examples as well. I'm particularly interested in knowing what is…
Rook
  • 54,867
  • 44
  • 156
  • 233
13
votes
5 answers

Can I use git with .dwg (autocad)?

Version control with .dwg is really a problem. I'm wondering if it is possible to use git to control the version? or just commit my changes in the file? If this is not possible, then what is a good way of version control .dwg? I find this: Can GIT,…
cqcn1991
  • 15,169
  • 33
  • 104
  • 180
13
votes
4 answers

Are there any libraries for parsing AutoCAD files?

Are there any libraries (preferably open-source) for parsing AutoCAD files (DWG or DXF)?
mipadi
  • 359,228
  • 81
  • 502
  • 469
11
votes
2 answers

Best practices with Unit testing on Third Party software API's (AutoCAD)

We are developing applications for use within AutoCAD. Basically we create a Class Library Project, and load the .dll in AutoCAD with a command (NETLOAD). As so, we can use commands, "palettes", user controls, forms etc... AutoDesk provides an API…
Bertvan
  • 3,837
  • 5
  • 36
  • 59
11
votes
5 answers

How can I open AutoCAD 2015 through the .NET API

I've been browsing for a good hour and have yet to find something that would help with this. I'm working on opening AutoCAD from the .NET API in VS2013 using C#, but for some reason, I can never get AutoCAD to actually launch. I'm using the…
Archer
  • 442
  • 1
  • 4
  • 12
10
votes
5 answers

Create Autocad file with C#

I am expoloring currently an AutoCAD .NET API to create a dwg files from winform. Is this possible or should I look for another library? Are there any new tutorials of doing so? thanks Thanks for all your answers .... I will stick with my old DXF…
Jim
  • 2,262
  • 8
  • 37
  • 52
10
votes
2 answers

Dealing with autocad objects in Unity

I am new in Unity development and I have good experience in Autocad development. Is it possible to use 3d solids & 3d mesh terrains created in autocad and display it in the Unity interface and also get its properties (such as 3D solid color,…
Doicare
  • 351
  • 1
  • 3
  • 14
1
2 3
80 81