AutoCAD .NET
-
This was a topic suggested by Scott Underwood (thanks, Scott! 🙂 to look at COM vs. NET and go through their respective advantages and disadvantages… This is really an interesting discussion topic, and one that I'd like people to help turn into an interesting discussion. I can certainly talk about the differences and pros/cons of […]
-
Clearly it's far from ideal to ask your users to load your application modules manually into AutoCAD whenever they need them, so over the years a variety of mechanisms have been put in place to enable automatic loading of applications – acad.lsp, acad.ads, acad.rx, the Startup Suite, to name but a few. The most elegant […]
-
In my previous post I described how you could use the Autodesk.AutoCAD.Runtime.IExtensionApplication interface to implement initialization code in your .NET module. Building on this, we're now going to look at how use of the Autodesk.AutoCAD.Runtime.IExtensionApplication interface can also allow you - with very little effort - to optimize the architecture of your managed modules for […]
-
It's very common to need to execute some code as your application modules are loaded, and then to clean-up as they get unloaded or as AutoCAD terminates. Managed AutoCAD applications can do this by implementing the Autodesk.AutoCAD.Runtime.IExtensionApplication interface, which require Initialize() and Terminate() methods. During the Initialize() method, you will typically want to set system […]
-
One of the services ADN provides its members is representation of their wishes with Autodesk's Engineering teams, helping influence product direction. For instance, each year we run an API wishlist survey for a number of our products (this year it was AutoCAD, ADT, Revit, Inventor, and Map 3D). An online survey for each product gets […]
-
Another case of planets aligning: two different people have asked me this question in two days... It's quite common for commands to require users to provide additional input during execution. This information might be passed in via a script or a (command) from LISP, or it may simply be typed manually or pasted in by […]
-
In this earlier entry I showed some techniques for calling AutoCAD commands programmatically from ObjectARX and from VB(A). Thanks to Scott Underwood for proposing that I also mention calling commands from .NET, and also to Jorge Lopez for (in a strange coincidence) pinging me via IM this evening with the C# P/Invoke declarations for ads_queueexpr() […]
-
Someone asked by email how to get the block import code first shown last week and further discussed in yesterday's post working with AutoCAD 2006. I've been using AutoCAD 2007 for this, but to get it working there are only a few changes to be made. Firstly you'll need to make sure you have the […]
-
I didn't spend as much time as would have liked talking about the code in the previous topic (it was getting late on Friday night when I posted it). Here is a breakdown of the important function calls. The first major thing we do in the code is to declare and instantiate a new Database […]
-
We're going to use a "side database" - a drawing that is loaded in memory, but not into the AutoCAD editor - to import the blocks from another drawing into the one active in the editor. Here's some C# code. The inline comments describe what is being done along the way. Incidentally, the code could […]