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

Autocad scaling

I'm studing AutoCAD and encountered with a scale problem. I write a simple detail, but when i'm setting Lineweight 1.00 mm AutoCAD draw 2cm line instead of 1mm line. I tried to change scale in Annotate -> Dimensions -> Scale factor = 0.05, but it…
Alex Zhukovskiy
  • 9,565
  • 11
  • 75
  • 151
0
votes
1 answer

Assign Xdata For AlignedDimension

I am using AlignedDimension object of Autodesk.AutoCAD.DatabaseServices to create objects in autocad. I want to store some data in XData of Dimension object using TypedValue object. But when we assign the resultBuffer to XData it does not assign the…
ashwini
  • 1
  • 1
  • 2
0
votes
2 answers

C# wrapper for acdbEntGet and acdbEntGetX

I need a wrapper for acdbEntGet and acdbEntGetX in C#. These functions are located in accore.dll (AutoCAD 2014) and I've tried this: [DllImport("accore.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto, EntryPoint =…
Jeff Merlin
  • 320
  • 2
  • 12
0
votes
2 answers

Could not load type 'System.Windows.Input.ICommand'

I am writing extension for AutoCad using Object ARX 2015 and .Net Framework. On my computer everything work good. But when i try to use my .dll on other computer. I get this error: Exception Text System.TypeLoadException: Could not load type …
0
votes
1 answer

Android Library: Loading Autocad 3D files in android

I want to load AutoCAD 3d objects into my Android project, is there any library available for android ?
Arun
  • 273
  • 3
  • 13
0
votes
1 answer

Plotting circles and arc without segmentation (PLT format)

I'm having problems plotting vector objects such as arcs and circles from Autodesk without forcing them into set of lines. PLT (HPGL) file format supports both circles and arcs defined through various means, but for some reason, the output uses just…
Raven
  • 4,783
  • 8
  • 44
  • 75
0
votes
1 answer

Searching for a specific block when multiple blocks have the same name

Good Day, I've got the problem where the c# program inserts 10 blocks (Via a matrix transform method) onto the drawing at various different points the user is prompted to identify. The blocks are identical in terms of name and attributes, the only…
Cald
  • 201
  • 2
  • 6
0
votes
1 answer

Selection set cleared after command when using UsePickSet

I have to run a command with a preselected set of polylines. I use the UsePickSet because of this. After the command, I need to indicate to the user by hilighting/selecting a smaller set of filtered polylines. I add these to the selectionset after…
nonexistent myth
  • 135
  • 1
  • 14
0
votes
1 answer

"exception: access violation writing" error in Python (ctypes)

I've been learning python (2.7) for a couple of weeks to be able to automatise autocad, so, be patient I'm python noob. I'm trying to get the attributes of a newely created block to modify them, the doc says that in VBA it would be: Set blockRefObj…
ubugnu
  • 1,004
  • 2
  • 15
  • 30
0
votes
0 answers

AutoCAD ObjectARX .NET wrappers

In AutoCAD ObjectARX .NET wrappers, how would I expose virtual functions such as subWorldDraw(), so that they can be overridden by classes derived from the managed wrapper? I could call a proxy from the native method, but what about the…
0
votes
1 answer

Extract Clip from WPF Canvas

I'm having issues trying to not only clip, but to "extract" a portion of a WPF Canvas. So basically I would like the "Clip" to expand to the full size of the window, or convert the clipped item to separate UI Element for exporting to PNG. I write…
Tim Davis
  • 524
  • 6
  • 17
0
votes
3 answers

Why does AutoCAD throw a fatal error when I try to read line start and end points?

I am writing a plug in to pull as much data out of a CAD as possible. The main issue I am having right now is when I try to access StartPoint.X, for example, the script fails without catching an exception with "FATAL ERROR: Unhandled Access…
Brady
  • 33
  • 4
0
votes
1 answer

Block insert via Matrix3d can have attributes?

Good Day, I'm trying to create a csharp program to insert multiple blocks onto an Autocad drawing, each one with a different insert point. For simplicity given the block is another drawing I'm using a matrix insert that I'll paste below. The problem…
Cald
  • 201
  • 2
  • 6
0
votes
2 answers

AutoCAD C# Select objects after SendStringtoExecute

Does anyone know how to select objects after SendStringtoExecute? The best for me is select object using fence or a point. Here's the part of my code: foreach (ObjectId objId in NormalblkTblRec) { if (objId.ObjectClass.Name == "AcDbArc") { …
0
votes
1 answer

How to hide the 'Press F1 for more help' in AutoCAD ribbon?

How to hide the text 'Press F1 for more help' but keep the tooltip above it ? Even though we press F1 for more help, a help window will be popped-up and search from the official document with no result, therefore such help shortcut can be removed…
tony.0919
  • 1,145
  • 5
  • 16
  • 27