April's plugin of the Month: XrefStates for AutoCAD

Yes, I know, I know – we're halfway through the month, already. This plugin has been live on Autodesk Labs since the beginning of the month, but I've been a little distracted by April Fools' jokes, fooling around with Photosynth point clouds as well as finishing up some internal activities which always tend to take time away from blogging at this time of year.

Anyway, I've been remiss talking about this very cool application, but at least Scott was there to announce it on day one.

The application was developed by Glenn Ryan, and there are a number of notable things about this tool. Firstly, it implements something that's very useful – the ability to save and restore the "loaded/unloaded" state of the various external references in a drawing – and, secondly, it does so in a very elegant way. It's rare that I come across such a well-structure codebase, and I, for one, learned a number of new tricks when looking into it. Glenn has done a great job with this one, and I fully recommend taking the time to check it out.

There's quite a lot to the code, so I'm not going to duplicate it here. I will show the main application dialog – in this case with a number of XrefStates created – to give you a feel for its capabilities:

XrefStates dialog inside AutoCAD

Once you've set up the XrefStates for your project they get saved inside the master drawing, which allows them to be used in future editing sessions. To do this Glenn chose to use Xrecords, which store the data in a relatively open manner (as opposed to it being locked up in a custom object requiring a enabler).

A big thanks to Glenn for providing this very useful – and well-written – application.

3 responses to “April's plugin of the Month: XrefStates for AutoCAD”

  1. Glenn
    It is good to see some more of your ideas and outstanding code being published. XrefStates is an awesome plugin, and, as always with Glenn's programming, it is well structured and stable. I wish I had this plugin 4 years ago. I can't wait use it on our next big project.

  2. patrick evangelista Avatar
    patrick evangelista

    Kean/Glenn,
    I know that this is 10 years old, but is it still possible to download the codes for this app? the link below doesnt seem to work anymore.
    labs.autodesk.com/ut...

    thank you 🙂

    1. You should still be able to get it from the AutoCAD App Store.

      apps.autodesk.com/A...

      Kean

Leave a Reply to Kean Walmsley Cancel reply

Your email address will not be published. Required fields are marked *