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

How to convert AutocadDWG To PDF?

Is there another way to convert AutocadDWG To PDF but to use third party programs? Thanks for any suggestions.
joycollector
  • 1,986
  • 4
  • 17
  • 18
4
votes
1 answer

How to open all .dwg files in a directory in one instance of AutoCAD using Python

I started learning Python (and coding all together) this week and i'm stuck on a simple task i want to do. The functionality i'm looking for is this: Print all .dwg files in a specified directory in the console. Open an instance of AutoCAD. For…
itsme
  • 41
  • 3
4
votes
1 answer

How to find the options available for syntax in VBA

I was not sure of the appropriate terminology for the Title. Please suggest edits if my title is bad SITUATION I am running AutoCAD through Excel's VBA. As part of my coding, I am hard coding the base dimension style in AutoCAD. I am not using…
Forward Ed
  • 9,484
  • 3
  • 22
  • 52
4
votes
2 answers

How can I improve the speed of .NET Plug-in Development?

I'm developing an AutoCAD add-in, which uses a .NET 4.6 assembly. I am finding the development process very frustrating; the API is very large and the documentation beyond getting started is all over the place and very hard to find. The only way to…
Steve Rukuts
  • 9,167
  • 3
  • 50
  • 72
4
votes
6 answers

premake5: how to set runtime library to Multithreaded DLL (/MD) in vs2015

kind "SharedLib" language "C++" defines "DLL_EXPORT" targetname "read_cad_file" targetextension ".arx" I am developing using objectARX, and I want to compile my project using premake5 and vs2015. Some of the settings in the script is as the…
summer
  • 41
  • 1
  • 3
4
votes
0 answers

Reading DWG file in Python and extracting edge points

I have a DWG file in which I have a rectangle with several lines in it (e.g. floor plan with interior walls). How can I use Python to extract the edges (X,Y Coordinates)? I need to extract the floor plan as a graph with nodes and edges defined. So…
USC.Trojan
  • 391
  • 5
  • 14
4
votes
2 answers

AutoCAD drawing (DWG) to map tiles

Rendering large DWG files as such has shown performance degradation to large extent. Planning to use the concept of map tiles using leaflet. Need some pointers/information on how to convert DWG files to map tiles.
Shanadas
  • 515
  • 1
  • 6
  • 22
4
votes
2 answers

"Attempted to Read or write protected memory" error reading AutoCad databases in parallel

I am getting "Attempted to Read or write protected memory" when I try to perform some parallel operations. I am reading AutoCad Databases into to memory to do some data mining. I can do this with a regular for loop but not with a Parallel.ForEach.…
James Morris
  • 353
  • 5
  • 20
4
votes
2 answers

How do I create a dxf spline curve using fitpoints?

I'm trying to create a spline curve programmatically in a dxf file. I need to use fit points as the curve needs to pass through the specified points. I understand I also need to use control points. Is there a formula to calculate what these should…
AesculusMaximus
  • 195
  • 3
  • 14
4
votes
2 answers

Java library to programmatically convert AutoCAD .dwg files to PDF or image?

Is there a Java library (free and open source) that converts .dwg files directly to PDFs or images file? The .dwg uses recent normes of CAD (R14, R13, R12, and 2013). I know that there are a few in .NET and C++... The ones in Java are mostly…
user3336544
  • 211
  • 1
  • 4
  • 11
4
votes
1 answer

Mimic the behavior of AutoCAD's viewcube with C#

I have an object which I draw in AutoCAD from my program. After the object is drawn I have the camera set so that it zooms to the wall looking down from the top view. What I then want it to do is to orbit 45 degrees down toward front view and 45…
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
4
votes
2 answers

Load custom .net dll inside accoreconsole.exe

I am trying to load my custom .net dll inside accoreconsole.exe (AutoCAD 2016) using netload command but it fails to load the dll. Below is the output from accoreconsole.exe : Redirect stdout (file:…
amit
  • 363
  • 2
  • 10
  • 24
4
votes
6 answers

Importing AutoCAD/Solidworks drawings/objects into winforms?

Has anybody done anything like that? I need to import 3d objects, done in either AutoCAD or Solidworks, and draw them into a windows form. I only need the object to be viewed in 3D and moved around - no manipulation required. I am assuming I will…
Pudpuduk
  • 1,549
  • 2
  • 14
  • 23
4
votes
2 answers

Drawing DXF Arc using WPF ArcSegment

I'm trying to draw an imported DXF file using WPF over a canvas. I've been using DXFLib (available here) to read and parse various files and it seems to work really well. I'm now in the process to draw all the entities in the DXF but I'm stuck with…
Dan
  • 1,060
  • 13
  • 39
4
votes
1 answer

perpendicular/tangent object snap issue with AutoCAD in .NET

Here is an album of screenshots and corresponding descriptions which should storyboard the problem I'm about to describe. Now, let me explain my issue in mathematical terms and in the code (C#): ======================== Given: A circle with center…