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
1 answer

Is it possible to edit block attributes in AutoCAD using Autodesk.AutoCAD.Interop?

I have developed an external WPF application to generate drawings in c#. I have been able to draw, dimension, add blocks and every thing else required by the application using Autodesk.AutoCAD.Interop, however I can't seem to populate The title…
reckface
  • 5,678
  • 4
  • 36
  • 62
4
votes
3 answers

Does VBA keep a cache of past code changes?

I created a smallish application in VBA for autocad (.dvb file). It has a form and a bunch of modules. I originally wrote some code in a module that contained and IP address (10.0.0.16). Later on I replaced the IP address with the actual netbios…
bluesixty
  • 2,367
  • 3
  • 21
  • 21
4
votes
4 answers

Retrieving properties of AutoCAD object in C#

I am attempting to interrogate AutoCAD objects from C#. I am interested in being able to grab all of the properties of a given object and output them. For example, in the below snippit of code I am looping through all of the items on screen and…
Jason Jackson
  • 17,016
  • 8
  • 49
  • 74
4
votes
1 answer

How to catch unhandled exceptions thrown in AutoCAD.NET

In my Autocad.NET app I want to log all unhandled exceptions using log4net. AutoCAD itself shows an error dialog with a detailed message -> so there must be a way to register to a certain event. I tried to register the…
mamuesstack
  • 1,111
  • 2
  • 16
  • 34
3
votes
2 answers

What solutions do we have to read and display Autocad DWG files on Android?

I would like to display rich maps contained in Autocad .dwg files in my Android app. I'd like to know if there is an existing java library to do so? If not, is it doable to translate a dwg file to a model and draw that model shape by shape on the…
Romain Piel
  • 11,017
  • 15
  • 71
  • 106
3
votes
3 answers

How to get details from AutoCAD DXF file to java application?

I'm developing application which needs to get details from AutoCAD DXF file. Is there any specific API which support this task. Actually in my project I need to get building structures to my java application and I need to add some more details to…
SL_User
  • 1,934
  • 5
  • 24
  • 45
3
votes
2 answers

AutoCAD .NET API - Interrupting the close pallete/window/user control command

My first post, be gentle! Im developing my own user controls for AutoCAD 2011 and cant for the life of me figure out how to interrupt the close on the User Control and insert my own functions before carrying on with the close. Just for clarity here…
RobG
  • 33
  • 6
3
votes
0 answers

how to learn objectArx?

i have intermediate c++ knowledge and i was write some c# tools to autocad now i want to learn ObjectArx i spent some time to google for tutorial or something start with and get that link http://arxdummies.blogspot.com/ this is only useful link on…
Khalid Omar
  • 2,353
  • 5
  • 35
  • 46
3
votes
2 answers

Debugging an AutoCAD module

I am working on a project which is a dll module for AutoCAD, which adds some new functionality (like menus, objects, etc.) to the environment. Naturally, there are some bugs in the menus, objects of the module. The problem is as follows, when I see…
grzkv
  • 2,599
  • 3
  • 26
  • 37
3
votes
4 answers

C# export to DWG

I am hope to write a C# application take takes some numbers as input and export in a format that can ultimately be editable as dwg files. I read that exporting directly to dwg is difficult, but I can accept if I can export to imtermediate format…
Jake
  • 11,273
  • 21
  • 90
  • 147
3
votes
3 answers

View Autocad Drawings inside Delphi application

Is there a way ( ole or component ) to view Atocad 2004-2011 drawings inside Delphi application ?
Yordan Yanakiev
  • 2,546
  • 3
  • 39
  • 88
3
votes
2 answers

pyautocad example is not running

I am trying out the pyautocad package in python for AutoCAD automation. I tried the following code: from pyautocad import Autocad, APoint import win32com.client AutoCAD = win32com.client.Dispatch("AutoCAD.Application.22") acad =…
Jaivishnu
  • 43
  • 6
3
votes
2 answers

Why are circle center coordinates (key 10) not relative to the origin in DXF data?

I need this piece of information for a filter that I'm creating. So let's say I set my grid and snap to 1 for example and then I place the origin with UCS. And then I draw a circle with center 5, 0. Here is what I get: ( (-1 .
3
votes
2 answers

How to check if application is running using AutoLISP

In CAD application (ZWCAD) I start my application by AutoLISP. (startapp "C://[path]//Application.exe") so the application runs each time new file is created. Works OK. Now I want to limit instances of application just to one. So how can I check…
CAD Developer
  • 1,532
  • 2
  • 21
  • 27
3
votes
1 answer

Finding blocks with Item Method in AutoCAD

I am trying to automate some tasks in AutoCAD using Python and pywin32. AutoCAD version is 2018. I have tried to follow the method shown here in the AutoCAD documentation:…
prizenero
  • 33
  • 4