AutoCAD
-
In the first post in this series we looked at the basic (and free) capabilities of the upcoming version 6 of .NET Reflector. Today we'll look at the "Pro" capabilities, which integrate decompilation with debugging of 3rd party assemblies. To get started, we should see a new ".NET Reflector" toolbar inside our Visual Studio installation. On it, we should see a "Choose Assemblies to Debug…" option: This option launches an analysis of our currently open solution, to understand the assemblies that have been referenced inside it: One very important thing to note: for Reflector to work, you must have assembly…
-
As many of you will know, by now, I'm a big fan of Reflector. I've used it for quite some time, since its early days as a piece of freeware developed by Lutz Roeder, and overall it's proven to be an extremely valuable tool. When a UK-based company, Red Gate Software, acquired the Reflector technology back in 2008, I was curious as to their strategy for monetizing it (and it seems I wasn't alone in speculating on the direction the tool would take as a commercial offering). Well, that's now starting to become clear with the Beta release of .NET…
-
Thanks to Stephen Preston from DevTech Americas for the code that originally inspired this post. A nice little one to start the week. We're going to ask the user to select a bunch of lines and we'll then go through and edit each one, extending it in both directions by a quarter of its original length. The code shows a couple of interesting techniques: aside from extending the lines themselves we also use a SelectionFilter in combination with a PromptSelectionOptions object to restrict the selection process from selecting anything but lines (and to give a customized experience by changing the…
-
As a comment on this previous post, MikeR posted this request: Hi Kean, I'm the one that instigated this original question about group filters. That part is working fine and I can also set the active group filter in the file. Now I need to make parent & child filters. How can I add child filters to an existing parent filter at the root? Thanks, Mike The below code is an update of that shown previously, the main addition being the CNLG command to create a nested layer group. I also took the chance to fix a minor bug (I…
-
This is a really fun one: a new technology preview on Autodesk Labs that integrates powerful sketching – such as that available in SketchBook Pro and SketchBook Mobile (both of which I've played around with, at one point or another) – into AutoCAD 2010. Now it's not immediately apparent what the benefits are for having this kind of sketching integrated directly into AutoCAD, but for sure it saves application switching and is likely to make it easier to share marked-up models. The first thing I did was to install the application: To sketch you need to be in a layout,…
-
In the last post we looked at some code to define a block and insert it into the model-space of an AutoCAD drawing. Today we're going to look at creating a group. Before we dive into the code, it's worth taking a quick look at the difference between a block and a group, to understand the differences between these two container/aggregator objects. I know that much of this information is available elsewhere, but hey – I'm on a roll, so I request your forbearance. Let's start with looking at the top-level structure of an AutoCAD Database (which is equivalent to…
-
This post – and its sister post, which will cover creating a group – are further topics I would expect to have already covered in this blog at some point, or perhaps to see covered by the AutoCAD .NET Developer's Guide (and I'm sure they will be in a future incarnation of it). So thanks to Adam Nagy, from DevTech EMEA, for suggesting these topics. It's nice to go back to basics once in a while (although this means I do have to beg the patience of the readers out there who know this stuff inside out). So, here's some…
-
Back in this previous post we looked at some code to sweep an AutoCAD surface using .NET. As I mentioned in a later update, it's possible to also sweep an AutoCAD solid using .NET (since AutoCAD 2010: prior to that one had to use ObjectARX). I've just received a comment asking me to show how to do this, so I thought I'd cover that, today. The code difference is tiny – we simply need to change the type of object we're creating and call a different method with the same arguments. Where for a SweptSurface we would do this… SweptSurface…
-
Sometimes I receive a question which makes me think "I must have posted something that shows that by now, surely?" and yet I can't find it. So please accept my apologies if this post is redundant and I'm just repeating myself. 🙂 Here's the question that had me thinking: I don't know how may I create a new layer in drawing. And here's some code I threw together to show this. It defines a simple command called CL which creates a layer with the name proposed by the user, after validating the name using the SymbolUtilityServices namespace (which I admit…
-
Firstly, a slightly belated "Happy New Year!" to all of you. I'm now easing back into the saddle after three very relaxing weeks off with family and friends. One of the first activities I had on my plate in 2010 was to tidy up the application I presented in this previous post and turn it into January's Plugin of the Month, FacetCurve for AutoCAD. The original C++ application this plugin is based on was generously provided by Jon Smith from COINS, a long-time ADN member (thanks, Jon!). You'll find the official announcement over on Scott's blog, in his trademark eye-catching…