August’s Plugin of the Month: RefUcsSpy for AutoCAD

Just a quick note to say Glenn Ryan's latest contribution, RefUcsSpy, is now live as August's Plugin of the Month. I posted a preview of the application a few weeks ago, and you can now get the compiled plugin with complete source project from the Plugin of the Month page on Autodesk Labs. Thanks, Glenn! 🙂

You'll note the posted plugin only claims support for AutoCAD 2009 onwards. This is because it relies on the Task Dialog implementation introduced in that version of AutoCAD. If you would like to get it working for prior versions of AutoCAD, you'll find an alternative implementation using standard Windows UI components (i.e. a MessageBox), which Glenn has kindly provided in the DocData.cs file. If you have trouble getting this built, let me know: I'll put something together to post/send out.

5 responses to “August’s Plugin of the Month: RefUcsSpy for AutoCAD”

  1. Just a note to those that download and install this, that it will affect any kind of scripting that automates any of the affected commands, if the scripting tries to attach something in a non-World UCS intentionally, or not. I suppose that all the hoops that most AutoCAD commands jump through to avoid user interaction when they're being scripted was not an option here.

  2. Hi Tony,

    Is this warning based on testing or analysis of the code?

    Glenn has included a test of the appropriate flag of CMDACTIVE (& 4), to make sure the dialog doesn't get shown when a script is running.

    If you have specific scenarios where this is inadequate, please share them.

    Regards,

    Kean

  3. Hi Kean. By 'scripting' I was referring to any type of automation of the command line, be it via a .SCR (script file) or by LISP.

    The CMDACTIVE bit that tells if LISP is running is not 4, it's 32.

  4. Actually the code is, in fact, checking for script files (*.scr) via appropriate CMDACTIVE bit (4).

    It seems we're not checking for LISP (bit 32), but that's a simple enough fix - I'll post a new version to Labs today.

    Kean

  5. Hi Miro,

    Without write access to acad.exe.config you may be out of luck.

    There may be some information in this post about Revit that may help you (I haven't looked at it in detail, myself).

    Regards,

    Kean

Leave a Reply to Kean Walmsley Cancel reply

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