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
9
votes
4 answers

how to subversion AutoCAD

I am new to Subversion. I was trying to subversion AutoCAD files for my projects deparment, however it does'nt seem to work. It works fine with docs and xls files etc., Along with 'subversion', i am using Tortoise SVN client. Would appreciate some…
sams
  • 91
  • 1
  • 2
8
votes
2 answers

Visual Lisp: how to call functions in external C++ DLL

I have a C++ dll I have written (native, not .net), and I would like to use its functionality from Visual Lisp. Can anyone point me to an example of how to do this, or at least which bit of documentation to read?
Sideshow Bob
  • 4,566
  • 5
  • 42
  • 79
8
votes
1 answer

Set default value for string prompt

The editor class has a method called GetString which prompts the user for a string value via AutoCAD's command prompt. I call it in this wrapper method: public static string PromptUserForString(string message = "Enter a string: ", string…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
8
votes
3 answers

ThreeJS: is it possible to simplify an object / reduce the number of vertexes?

I'm starting to learn ThreeJS. I have some very complex models to display. These models come from Autocad files that my customer provides. But sometimes the amount of details in the model is just way too much for the purpose of the website. I…
Dylan
  • 9,129
  • 20
  • 96
  • 153
7
votes
3 answers

How does AutoCAD calculate end tangents for splines defined only by fit points?

AutoCAD allows to store SPLINE entities in the DXF files defined only by fit points, the problem is, that such a spline definition has infinite numerical correct solutions and Autodesk does not provide the necessary information to calculate the…
mozman
  • 2,001
  • 8
  • 23
7
votes
1 answer

Converting a graph to a 2D diagram

I want to create a 2D diagram like the following, The above image has been created using Graph in MATLAB (ref) s = [1 1 1 1 2 2 3 4 4 5 6]; t = [2 3 4 5 3 6 6 5 7 7 7]; weights = [50 10 20 80 90 90 30 20 100 40 60]; G =…
Natasha
  • 1,111
  • 5
  • 28
  • 66
7
votes
1 answer

Using Python to Automate AutoCAD

I'm very new to Python and AutoCAD so please bear with me. I'm trying to use Python to automate a design cycle in AutoCAD. So far I am able to add points and lines in AutoCAD via Python but I want to be able to change the linetype to a dotted line.…
DanRBarker
  • 71
  • 1
  • 1
  • 2
6
votes
4 answers

Converting RGB Colors to closest ACI Color in C#

I am currently writing a Programm that interacts with dxf files. Therefore I need a Routine that takes RGB Color Values and gives back the closest Color in the AutoCAD Color Index (ACI) Has anybody some Code or an example how to do that? It would…
Hendrik Unger
  • 61
  • 1
  • 2
6
votes
4 answers

Circumflex accent before c IN LISP

I'm studing lisp and I found this: (zoom in)^C ^C , but the text don't explain it, and I searched "^C ^C" in other places but didn't found anything. Can someone here help-me? (I'm studying english yet, sorry if I wrote anything wrong)
FERNANDO MESQUITA
  • 385
  • 1
  • 3
  • 4
6
votes
3 answers

Calling AutoCAD commands from C#.NET

I'm trying to write two methods which call AutoCAD's UNDO command and pass in different parameters. The first method calls UNDO and passes M which means mark the position of the drawing. The second method calls UNDO and passes B which means undo all…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
6
votes
1 answer

Drawing Tables in AutoCAD

I am trying to get my C#.NET Plugin to draw a table in AutoCAD with information based on a .NET form the users fills out. The code I am using to attempt this is based off this page. Modifying it for my plan, the code looks like this: using…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
6
votes
1 answer

Running VBA Macro in AutoCAD

I'm making a .bundle folder for the plugins I've programmed for AutoCAD. At the root of the folder is my PackageContents.xml bundle where all of my Lisp plugins are autoloaded. Since .dvb is not a supported type for Autoloading I made a Lisp file to…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
6
votes
3 answers

Build automation for AutoCAD Lisp files

I have a huge LISP project, I've made a prv file that permits to the VLIDE to compile this project into a single vlx file (it compiles also the fas file). The problem is that it is not possible to compile the project from outside the autocad or from…
Tobia Zambon
  • 7,479
  • 3
  • 37
  • 69
6
votes
6 answers

Starting point for learning CAD/CAE file formats?

We are developing some stress and strain analysis software at university. Now it's time to move from rectangles and boxes and spheres to some real models. But I still have little idea where to start. In our software we are going to build mesh and…
Escader
  • 69
  • 1
  • 2
5
votes
2 answers

CAD insert block with thumbnail under mouse

I need to insert an external DWG into an AutoCAD drawing via C# plugin. I need to "ask" to the user the insertion point and rotation of the inserted block. Until now I've always used a lisp function that calls the command "._-insert" which gives a…
Tobia Zambon
  • 7,479
  • 3
  • 37
  • 69
1
2
3
92 93