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

1395 questions
3
votes
2 answers

Getting Entity data from Autocad

This is a two part question. 1) Is there any way to get a csv file of all the entity data, including xdata, for an autocad dwg, either using autocad or some other method? 2) Is there an easy way to parse a autocad dxf file to get the entity data…
JPB
  • 51
  • 1
  • 3
3
votes
1 answer

Getting subentity vertex points of solid in AutoCAD

I am trying to find the vertex points of a swept polyline. So i have a solid that was created by sweeping a circle along a 3D polyline. It looks like that:image of sweeped solid Googeling the whole of friday last week i think i have to play around…
Smir
  • 61
  • 1
  • 9
3
votes
1 answer

Get the extents on a drawing using the database without opening the drawing

In the AutoCAD .NET API, while you have a drawing open, you can get the extents using the environment variables EXTMAX and EXTMIN. However, these variables don't supply correct values when you do NOT have the drawing open. How do you get these…
skeletank
  • 2,880
  • 5
  • 43
  • 75
3
votes
1 answer

Excepting a COMError in Python

Having difficulty excepting a COMError in python. Below is the method I call to do some stuff in AutoCAD. def populate_drawing(self): nMeasurementsFinal = Feature_recognition.determine_OD_dims(Feature_recognition(),…
RBuntu
  • 907
  • 10
  • 22
3
votes
1 answer

Invalid argument tag

I am doing some customization of block insertion in Autocad. When setting up the attributes, I am getting an error in my procedure: "Invalid argument Tag in setting TagString" The code is as follows: Sub Ch10_GettingAttributes() ' Create the block …
tmccar
  • 85
  • 11
3
votes
3 answers

Manipulating maps

Given a set of floorplans (in Autocad, svg, or whatever format need be...), I would like to programatically generate directions from point A to point B. Basically I would like to say: "How do I get from room 101 to room 143?" (or for triple bonus…
Nate
  • 331
  • 3
  • 9
3
votes
1 answer

Get handle of Object in AutoCAD 2015 from vb.net

I have managed to link my Visual Studio to my AutoCAD 2015, but I am struggling to get a handle on a text object within my AutoCAD project from vb. I was wondering if anyone had any suggestions or tips as to how I could get a handle on an AutoCAD…
daniel aagentah
  • 1,672
  • 5
  • 29
  • 56
3
votes
1 answer

Drawing a solid box with meshes

I'm trying to programmatically draw a solid box/rectangle in AutoCAD using C#. I'm close but the top and bottom of the mesh is not solid. Here is my method to draw a mesh [CommandMethod("TESTSIMPLEMESH")] public void TestSimpleMesh() { // Get…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
3
votes
2 answers

Doing multi-threading jobs inside AutoCAD .Net plugin

I am aware that Autocad APIs are not supposed to be called/used in multi-threading. But how about doing a multi-thread job(in an Autocad .Net plugin) that does not involve any specific Autocad calls/type? The situation is like this: 1.some CAD…
ali
  • 529
  • 4
  • 26
3
votes
1 answer

Parse the extrusion direction vector DXF

I am parsing a DXF (Autocad) file. In this file there are several entities with an extrusion vector different from the "default" (0, 0, 1). I am having a lot of trouble parsing these entities because their coordinates have to be mapped in order to…
Nick
  • 10,309
  • 21
  • 97
  • 201
3
votes
0 answers

AutoCAD's PolygonMesh Class behaving weird (C#)

I'm trying to draw a series of polyhedrons in AutoCAD that represent a wall. Each part of the wall is one individual polyhedron which will all eventually be grouped together. I'm trying to draw them as PolygonMeshes so they can be rendered as solid…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
3
votes
4 answers

AutoCAD library in Java to read .dwg files?

Is there any open-source Java or JavaScript library available to parse .dwg files and get the objects from it. I would like to extract data from a table of text for my project. It seems that the AutoCAD developer community prefers .NET and C/C++…
user3336544
  • 211
  • 1
  • 4
  • 11
3
votes
2 answers

How can be Autocad so fast to pan and zoom?

I am developing an image viewer where graphics are rendered with antialiased mode. Images can be first edited using Autocad that generates DXF files. The application is written by using Visual C++ and Direct2D. Although I am able to load the image…
Nick
  • 10,309
  • 21
  • 97
  • 201
3
votes
3 answers

Convert Autocad DWG to OBJ, FBX or similar

How can i convert an autocad dwg or dxf file to a more 'common' format like OBJ, FBX, 3DS, etc. ? I have tried a free software called abviewer 10 but the exported file is always empty.
AHS
  • 175
  • 1
  • 3
  • 13
3
votes
4 answers

How does one parse and convert AutoCAD MText entity to raw text?

I would like to parse AutoCAD's MText entity and extract the raw text. I see a pattern in the way the text is formatted. If this has already been solved, then I would not need to reinvent the wheel. I have searched online, but have not found…
Elan
  • 6,084
  • 12
  • 64
  • 84