RealDWG
-

Over the weekend I received an email from Jürgen Becker. It came with this image, which certainly brought back memories. The email referred to our recent trip down memory lane… I read your last post and remembered a poster. Do you remember that release, it was terrible? This is one of my favourite "chat over a beer" topics, and one that seems relevant to where we are today with Fabric, so I wrote Jürgen a quick note to say that I'd reply via my blog. Here is that reply. R13 was bad, but it had to happen I joined Autodesk…
-

A comment on the last post made me think it's probably worth diving into LINQ a bit further, as there's clearly interest out there. Now I don't actually use LINQ very much but whenever I do I tell myself I ought to use it more – it's really very useful. A lot of LINQ is derived from the world of Functional Programming – in that it allows you to use higher order functions to manipulate data – and it's really just another way in which .NET languages have been influenced by FP (and have evolved to incorporate its techniques in…
-
A question came up recently in an internal discussion and I thought I'd share it as it proved so illuminating. If I have an object of a type which implements IDisposable, is it good practice to explicitly dispose it (whether via the using statement or calling Dispose() explicitly)? The quick(ish) answer is: Yes it is, but sometimes you might choose not to as the increase in code simplicity outweighs the benefits derived from manually disposing of the objects. So, naturally, the devil is in the detail. Let's take a look at the three scenarios where you're likely to be working…
-
In addition to the existing collection of DevTV sessions, we have just posted a DevTV session on RealDWG. It is available for download (97.5 MB) or for online viewing. A big thanks to Adam Nagy from our DevTech team in Europe for delivering this informative session!
-

[As mentioned in the last post, I'll be publishing chunks of the handouts for my AU classes via this blog over the coming weeks] Introduction This session focuses on downstream technologies that can be used to access DWG content outside of AutoCAD-based products. We're going to start by creating a basic model inside AutoCAD comprised of 3D solid objects, and then look at a simple AutoCAD .NET application to access information about those solids. We will then take the same code and build a non-graphical (in terms of geometry - it does, after all, have a GUI) application around it…
-

This post finally takes the code last shown in this previous post, migrating it to use RealDWG to update a folder of DWGs without the need for AutoCAD to be installed on the system. A big thanks to Adam Nagy, a member of DevTech working from our Prague office, who turned around my request to convert the code to work with RealDWG in a matter of hours (if not minutes). Firstly I need to make it clear that this code will not run without both RealDWG installed (I'm using RealDWG 2007, as the file format didn't change between 2007 and…
-
In the last post we looked at some code to search the current drawing for a particular attribute and update its value. In this post - as promised - we're going to look at how to extend this application to work on a folder of drawings, updating those that contain the attribute and saving them to a new filename. Rather than implement a fancy, graphical user interface, I've stuck with my approach of using the command-line for input and output. If you wish to implement your own UI, please do - it's really easy using .NET. I get the occasional…
-
This suggestion came up in reference to this previous post about using side databases. The request is to be able to open a number of DWG files and modify a particular attribute, saving the files back. Rather than jumping in and solving both problems in one post, we'll start today with the problem of updating the attribute and then in the next post we'll look at some code we can use to process a folder of DWGs, opening, updating and saving each one. I'll probably then go one step further and look at the steps needed to extract this code…
-
This topic was briefly introduced almost a year ago, in this post. I then looked into the code a little further in a follow-up post. But at the time this topic wasn't the main thrust of the post, it was really more of an implementation detail. So now it's time to do the topic a little more justice. 🙂 Let's start with some terminology. What we're talking about today are often referred to as "side databases" or "external databases". Basically they're DWG files that are not open in the AutoCAD editor, but ones we want to access programmatically to load…
-
It's been quite a week... I was attending Autodesk's annual One Team Conference in Las Vegas, and had a number of meetings before, during and afterwards (hence my inability to make any posts whatsoever since Sunday). It was hectic, but a great event - the highlight for me was the keynote address on Wednesday by none other that Bill Clinton, the 42nd President of the United States! Wow. Anyway, late last week it came to my attention that a presentation of mine had made it onto one of Autodesk's public websites. Thanks to posts on Jimmy Bergmark's and Scott Sheppard's…