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

How to run a .dvb file on a .dwg file load using Visual Basic in Autocad 2012?

I am trying to load and run a .dvb file on every drawing file load in Autocad2012. I am trying to automate this thing like if anybody opens a .dwg file VBA will run automatically.
Rahul
  • 1,070
  • 3
  • 21
  • 47
0
votes
3 answers

How to combine 2 entities as 1 in Autocad .net

I'm making an autocad plugin and i want to create a new entity that is a combination of a line and the text.If i select the line the text is selected and backwords when i delete the line delete the text etc etc.How to treat them as one object…
Antonio Papa
  • 1,596
  • 3
  • 20
  • 38
0
votes
1 answer

How does one change the angle of a gradient added by VLA-AddHatch in AutoCAD?

I am creating a gradient inside of a LWPolyLine with the code (progn (setq hatch (vla-addHatch mspace acPreDefinedGradient "LINEAR" :vlax-true …
Favil Orbedios
  • 192
  • 2
  • 10
0
votes
1 answer

How do you detect if AutoCAD is done plotting in AutoLISP

Is there a way to figure out if a plot job is still working in AutoLISP? I am currently using the DWG To PDF.pc3 printer in a LISP script in AutoCAD 2007. Unfortunately, the vla-PlotToFile function returns immediately. I would like to automatically…
Favil Orbedios
  • 192
  • 2
  • 10
0
votes
1 answer

Autocad Object Snaps Near macro

I have this macro to increment numbers on each click. I would like it to set to object snap Near before i click so it will just snap the number to the nearest thing i…
Chumbawamba
  • 121
  • 2
  • 11
0
votes
1 answer

Loading (and executing) a lisp-file in autocad using .NET

I'm currently in the process of rewriting some old AutoCAD plugins from VBA to VB.NET. As it turns out, a (rather large) part of said plugin is implemented in LISP, and I've been told to leave that be. So the problem became running LISP-code in…
Alxandr
  • 12,345
  • 10
  • 59
  • 95
0
votes
1 answer

Read Autocad Drawing with VB6

I need to open and read the contents of an Autocad file, containing information for a building- walls, windows and so on and read and categorize that information. Since these Autocad files vary, i need someone with experience to advise me how can i…
0
votes
1 answer

acSelectionSetCrossing gives different result based on window zoom

I am using autocad2007.I have some trouble while using the acSelectionSetCrossing option in selectionset it gives different result based on the window zoom.if i zoomed out the window then performing selectionset operation means it will work but if i…
Sivaperuman
  • 239
  • 1
  • 4
  • 21
0
votes
1 answer

AutoCAD Lisp - How to get Y drawn vertically

I am currently using the following Lisp code to show the X and Y coordinates from the origin: (defun c:xy(/ pt pt1 pt2 x y xy) (setq pt (getpoint "\nPoint : ")) (setq x(rtos(car pt))) (setq y(rtos(cadr pt))) ; x- leader horizontaal …
James
  • 1,036
  • 1
  • 8
  • 24
0
votes
1 answer

Method called twice instead of single time

I have trouble with calling methods from lisp command in Autocad. I am using lisp file in Autocad. When I call the macro name from Autocad it calls the method twice instead of single time. In My lisp file (defun c:Export_N() (setvar "cmdecho"…
Sivaperuman
  • 239
  • 1
  • 4
  • 21
0
votes
3 answers

Algorithm for points inside a polyline inexplicably fails (AutoCAD)

I'm using the .NET API for Autocad, I have an algorithm (which I did not write) for determining if a point lies within a polygon (straight lines only). I have been testing my command on the same 51 polygons repeatedly. 99% it will work perfectly.…
Steve M
  • 9,296
  • 11
  • 49
  • 98
0
votes
0 answers

Autocad .net framework 32 bits selection

Gents, I was wondering if there is any way to configure the autocad.exe.config file so it works with the 32 bits version of .net framework. I'm developing an application for autocad 2008 32 bits in a 64 bits machine (windows 7) that gets some data…
roco3d
  • 3
  • 2
0
votes
2 answers

Drawing a line in VB without using Transaction Class for Autocad

I am Drawing a line using transaction class Public Sub CreateLine() Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument Dim acCurDb As Database = acDoc.Database Using acTrans As Transaction =…
0
votes
1 answer

COM Errors Visual Studio 2010

Recently I've been working on an external .exe to communicate with AutoCAD. Since it was an outside .EXE I had to work with the COM to get what I wanted. (Else I could've used the .NET API which is (in my opinion) much better). In any case, I keep…
Alex
  • 4,821
  • 16
  • 65
  • 106
0
votes
1 answer

WPF application reading ACAD 3D

I'm making a WPF application where I wanna open Autocad files and get the dimentions (width, hight, etc) of the 3Dsolids. After a few days of trouble I finaly managed to open the file and read it, the only problem now is that I can't get the…