Author Topic: Is the block editor active?  (Read 1609 times)

0 Members and 1 Guest are viewing this topic.

mkweaver

  • Bull Frog
  • Posts: 352
Is the block editor active?
« on: July 01, 2015, 02:57:35 PM »
I have a reactor running that logs the file name and time when I save my drawing (I use the log as a reminder of what I worked on when I do my time sheet).  However, if I'm in the block editor I would like it to include the name of the block.

How can I tell if the block editor is active?

I thought I might check to see if the "Block Editor" ribbon tab was showing on the ribbon, but it looks like it takes .NET to do that.

I wondered about checking the window caption, but that doesn't change in the block editor.

Suggestions appreciated.

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Is the block editor active?
« Reply #1 on: July 01, 2015, 03:21:07 PM »
Code - Auto/Visual Lisp: [Select]
  1. ;; Block editor active
  2. (= 1 (getvar 'blockeditor))

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

mkweaver

  • Bull Frog
  • Posts: 352
Re: Is the block editor active?
« Reply #2 on: July 01, 2015, 03:44:42 PM »
So simple.

Thanks!

Now I have to figure out how to get the name of the block I'm editing.  http://adndevblog.typepad.com/autocad/2015/03/identify-the-block-editing-mode-in-autocad.html explains how to do it in .NET, but I don't see anything for lisp.