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

How to draw Circle via visual studio Exe with Process Dll in Autocad?

I need to create the circle from my button click via process dll(Acdbmgd.dll ,acmgd.dll). I am able to create the circle via COM interop dll. But i don't know how to create the Circle using process dll. Here is the sample code: Database db =…
Sivaperuman
  • 239
  • 1
  • 4
  • 21
0
votes
2 answers

Error on opening different versions of AutoCAD

The program I'm working on will be used on AutoCAD 2013 and 2002. So, what I'm doing is checking if the user has 2013 and if it is not present to try 2002. The problem comes when the code links the AcadApplication object to the opened instance of…
Natzely
  • 706
  • 2
  • 8
  • 27
0
votes
0 answers

Can't handle exception Errorstatus.EInvalidKey in Autocad

Ok, so as usual Autodesk has little to no documentation on the subject so I'm trying to glean from my seniors here. I'm attempting to write a bit of code that will perform a WBlock operation on a List of xrefs in a file. When I try to go through the…
prestonsmith
  • 758
  • 1
  • 9
  • 29
0
votes
1 answer

AutoCAD COM Application slows down after a specific amount of iterations

I'm working with the AutoCAD COM library to move around blocks so they don't overlap. The way i'm doing it right now is move a selection set around in a circle trying to find an open space, if none was found it expands the circle. The problem is…
Natzely
  • 706
  • 2
  • 8
  • 27
0
votes
1 answer

Augmented Reallity - how to render texture after replacing teapot object in ios

I am ios developer, developing AR on iPhone. Customizing vuforia SDK for replacing teapot object. Until now able to replace Teapot with another 3d .obj model. I have used furniture model But how can I get the texture of that furniture (.png) file…
0
votes
1 answer

Finding specific attributes in AutoCAD drawing

So basically I will be given a spreadsheet with AutoCAD drawing attributes and I need to find each attribute in the AutoCAD drawing and replace its value with the one from the spreadsheet. Is there a way to find an Attribute with a specific tag name…
arazzy
  • 495
  • 1
  • 8
  • 23
0
votes
1 answer

How to create Frustum in DXF format for Autocad?

I am trying to create a frustum using DXF file with my text editor, but unable to find any good solution or way to create it. If anyone knows and would be obliged to help me find a solution DXF file or an example, that would be a great help. Thank…
Rahul
  • 1,070
  • 3
  • 21
  • 47
0
votes
1 answer

Adding a Vertex to a closed Polyline in AutoCAD

I am trying to insert a new vertex to an existing closed polyline through AutoCAD .Net API. I have a method for inserting a vertex to a polyline. But this does not work for closed polylines for the case shown below. The code fails if the point is on…
vinayan
  • 1,597
  • 3
  • 19
  • 42
0
votes
2 answers

Programmatically running Autocad script file using vb6

I am Using below code to open autocad file : Dim DwgName As String On Error Resume Next Set acadApp = GetObject(, "AutoCAD.Application") If Err Then Set acadApp = CreateObject("AutoCAD .Application") Err.Clear End If Set acadDoc =…
Preeti
  • 1,386
  • 8
  • 57
  • 112
0
votes
2 answers

ObjectARX SDK for c#

For last two days I have looking for sample code with steps which may help me to understand the Autocad API. so I can use the code in C#. [CommandMethod("LISTGEn")] public static void ListEntities() { Document acDoc =…
Rahul
  • 1,070
  • 3
  • 21
  • 47
0
votes
1 answer

Autocad right click event handler

I have written this code: int count = 1; while (true) { pointOptions.Message = "\nEnter the end point of the line: "; pointOptions.UseBasePoint = true; pointOptions.BasePoint = drawnLine.EndPoint; pointResult =…
Antonio Papa
  • 1,596
  • 3
  • 20
  • 38
0
votes
1 answer

Show block as Selected in Autocad - C#

We have the concept of Grouping among blocks. So, on selection of one block, I need to show the other blocks as selected in AutoCAD -2013. I have the AutoCAD Handle of the all the blocks available. The blocks should show the highlight, and must also…
nonexistent myth
  • 135
  • 1
  • 14
0
votes
2 answers

How to insert or create line in Autocad *.dxf drawing with VB.NET?

I'm programming on VBA for Autocad but until this day I can't found how to create or insert line on VB.NET. I see that VB.NET have two kinds of concepts to use the acad files. Using: AcApplication.DocumentManager.MdiActiveDocument; Using some like…
Zeus Paez
  • 31
  • 3
0
votes
1 answer

Edit AutoCAD database, adding new tables

I'm developing an AutoCAD plugin and I want to create new objects and new information. How can I access the AutoCAD database for example adding a new table and getting information from it? Is this possible? Is there another way to store information?
Antonio Papa
  • 1,596
  • 3
  • 20
  • 38
0
votes
2 answers

AutoCAD .net save custom object

I have created a custom class using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.DatabaseServices; using…
Antonio Papa
  • 1,596
  • 3
  • 20
  • 38