AutoCAD

  • In the last post, we introduced the idea of preventing object snapping on certain objects by tagging them with XData and then attaching an overrule within AutoCAD to stop it from getting osnap information for them. This worked very well for standard, single-object snap modes – such as center, quad, mid, end, etc. – but didn't work for intersection points. Intersection points are determined by calling an object's intersectsWith() method, which can thankfully also be overruled using a GeometryOverrule. Overruling this behaviour comes with a few important caveats, though: intersectsWith() can be called in a number of different scenarios, so…

  • Here's a fun one that came up as a question during the recently "AutoCAD APIs: Meet the Experts" session at Autodesk University. I promised during the session that I'd address it in a blog post this week, so here we are. But I'm splitting the post into two parts, so the more complete solution will only be available next week. The problem is as follows: we want to be able to disable osnap on specific AutoCAD objects by tagging them in some way. The solution proposed by the panel during the session (I forget by whom: it could have been…

  • I've been sick in bed since returning from AU2013 – the fever I experienced on Thursday morning, before travelling home in the evening, was apparently due to bacterial bronchitis, and I've been coughing really badly over the last few days. At least the fever has passed, but I did have to cancel my plans to travel to the Munich DevDay. It would have just been too much for me to be on a series of trains for a total of 7 hours each way. Next year. Anyway, here's a quick post I've had sitting around that I've just augmented with…

  • I'm sitting in Heathrow Terminal 5, waiting for my connecting flight to Geneva. A good time to reflect back on another intense week at Autodesk University. I arrived in Las Vegas for this year's AU last Saturday evening, flying via the UK on a flight that seemed full with AU attendees (even if Autodesk employees were limited to 20 per flight). Among others I bumped into Tilo Pfliegner from kubit and the CAD Professor himself, Sunith Babu. I've really found that having the extra day in Las Vegas – which I usually spend shopping for the family and hanging out…

  • I was planning to post about Autodesk University 2013 today, but things have just been too hectic. I have a 3-hour layover in Heathrow on the journey home – which starts this evening – so I'll try to use that to post a summary of this year's AU as experienced by yours truly. In the last post we saw some code to move an entity – any entity, with text as the primary requirement – in a block. Here's a version of the C# code that shows the entity as it's being jigged across the screen to its new position.…

  • I had this question come in from Bruce Gordon by email a couple of weeks ago, and it seemed like a fun one to look at: Is it possible to write a utility to pick a text entity in a block reference and move it to a new location? As a first step, I put together some code that launches a nested entity selection and then performs a translation of the selected entity by a specified displacement from the picked point. Given the requirement in the original request, the code works "first time" for text entities (DBText and MText), but…

  • I was hoping to get the Kinect for Windows 2.0 pre-release developer kit in time for AU – so I can talk about it intelligently, even if I don't end up demoing it – so when the UPS delivery man showed up, yesterday, I was very happy. As always, it started with a simple box: Which, once opened, revealed some nice monochrome graphics:                     And the device itself, of course (tripod is model's own ;-). The addition of the tripod screw-hole on the bottom is very welcome: I ended up buying…

  • There are lots of reasons to want to use the newly-released Visual Studio 2013 to develop and debug .NET modules for AutoCAD. One of the main ones is the long-awaited addition of Edit & Continue support for 64-bit applications. Unfortunately in this post we'll see why, despite the wait, E&C isn't going to work when debugging 64-bit .NET modules inside AutoCAD. The primary issue when running AutoCAD from the VS2013 debugger manifests itself in issues with font loading. If you launch AutoCAD from VS2013 to debug a 64-bit class library – even without actually loading the module – then AutoCAD…

  • Over the last few days, I've been playing around with Texas Instruments' SensorTag device, working out how to connect it to AutoCAD and make use of the data coming in from it to manipulate the current view. As mentioned in this previous post, the SensorTag is a $25 device containing a number of sensors – an accelerometer, a gyroscope, a magnetometer, a thermometer, a hygrometer and a barometer – that communicates to a monitoring system (whether an iOS or Android mobile device or a Windows or Linux PC) via Bluetooth 4.0. So what is it I expected to do with…

  • As mentioned in yesterday's post, on Monday I spent a few hours in the early morning at the local archeological museum, the Laténium. While this is nowhere near the scale of the Smithsonian, it is the largest archeological museum in Switzerland and is well known by people in the field, especially those interested in La Tène culture. I love the Laténium – our kids often seem to go there for birthday parties, which certainly beat the ones held at the local McDonalds – and so I was delighted to get to go "behind closed doors" (the museum is closed on…