AutoCAD
-
While I was preparing this recent post I put together a simple project which registered localized names for commands, to make sure they were picked up and used to create the appropriate demand-loading Registry keys. It was a little tricky to do this from the current documentation, so thankfully I had access to this DevNote on the ADN site which helped a great deal (this is only available to ADN members but don't worry if you're not one: this post should provide equivalent information and in certain ways goes beyond the original example). Anyway, it seemed a relevant topic to…
-
I recently stumbled across this post which inspired me to do something similar in AutoCAD (the fact that both posts cover Fibonacci spirals and use F# is about where the similarity ends - they do things quite differently). Fibonacci spirals are an approximation of the golden spiral, which for old timers out there will be reminiscent of the AutoCAD R12 (it was R12, wasn't it?) design collateral - the same as this one from AME 2.1 - which I still find cool after all these years. 🙂 The first thing was to create a function that returns a portion of…
-
Back at the beginning of the year I launched a programming contest for using F# with Autodesk products. A few months ago I introduced one of the winning entries showing how to use F# to implement Overrules in AutoCAD 2010. Now I've finally got around to unveiling the second winning entry. And the winner is… drumroll… Nada Amin, who entered her Master of Engineering project which uses F# with AutoCAD. Here is a description of the project from the MIT website: Micado: an AutoCAD plug-in for programmable microfluidic chips Programmable microfluidics, using multi-layer soft lithography, are lab-on-chip systems that can…
-
Fenton Webb, from DevTech Americas, is presenting two sessions on using WPF in your AutoCAD .NET applications. These will be of particular interest to developers wanting to take their ribbon interfaces to the next level in AutoCAD 2010, but will be of relevance to anyone wanting to understand more about WPF and how it can be used within AutoCAD. The first session is coming up quickly, on June 2nd (next Tuesday), but if you're reading this soon after I've posted you should still have time to register. The second session is scheduled for July 14th. Both sessions will be recorded…
-
Here's a question I received recently by email: How do you set up a .NET plugin for AutoCAD to install & demand load in the same way as ObjectARX plugins? The documentation is not very clear at making the distinctions visible. In ARX terms, we currently write a set of registry entries as part of our installer, along with refreshing these via an AcadAppInfo registration during ARX load. The ARX itself can be located anywhere as long as the registry entries point to it. I'm not sure of the correct procedure for .NET plugins to duplicate this. Augusto Gonçalves, from…
-
Just a quick reminder about the DevLabs my team is running, the first of which is being held next week in our UK office. Here's some additional information that was sent out in a recent technical newsletter for ADN members: If you don't have time to attend a training class, but you value the opportunity to work on your code with the help of an Autodesk expert, then DevLab is for you. Bring your laptop to our FREE DevLab and work on your code as you normally – the difference is that you have a team of DevTech experts (the…
-
Thanks to all of your interest in this recent post, which looked at a way to interface an out-of-process .NET application with an assembly running in-process to AutoCAD. After some obvious functionality gaps were raised, Renze de Waal, one of our ADN members, pointed out a DevNote on the ADN website covering – and more completely addressing – this topic. Shame on me for not checking there before writing the post. Anyway, onwards and upwards… The information in the DevNote highlights some of the problems I and other people had hit with my previous code, mostly related to the fact…
-
This question came in recently by email from Michael Fichter of Superstructures Engineers and Architects: Could you suggest an approach that would enable me to drive a .NET function (via COM) that could return a value from .NET back to COM? I have used SendCommand in certain instances where return values were not needed. Michael's referring to a technique used in this previous post, which shows how to launch AutoCAD from a .NET executable via COM and then launch a command which can then safely interface with AutoCAD in-process via its managed API. And yes, this technique is fine if…
-
This post extends the last one which looked at a basic implementation to allow AutoCAD's standard OFFSET command to work on the contents of external references. I haven't flagged the specific changes, but the old code (which is almost identical to that in the last post) starts with the Initialize() function. The previous example created geometry on a temporary layer that exists only as long as the source xref is attached: detaching the xref generally caused dangling layer references. This post evolves the approach and provides a choice to the user (via the XOFFSETLAYER command): to either create the geometry…
-
This was a fun little project: to enable AutoCAD's OFFSET command to work on the contents of external references (xrefs), something I'm told is a long-standing end-user wishlist request. AutoCAD's .NET API provides some very interesting events that make this possible without the need for us to implement our own OFFSET command. We can simply respond to the selection event and replace the selected object (the xref itself) with either an item contained in the xref or a clone of it that has been placed in the current space. I ended up using the latter approach: the former worked fine…