Detect if user is in block edit mode

Hi guys,

is there a way to detect if a document is currently in the block editor?
For running a own command I need to know this as the command does not work properly when being run within the block edit mode…



The best you could do is to check geometry states, the BlockEdit command basically hides the actual instance reference and locks anything everything else then in place explode/extracts the block instance geometry. All non locked objects will be tagged with block edit user data recording the original object state. Once this is done you are not technically in a command any more. The BlockEdit user interface does run commands when updating or when done editing so you would need a event watcher that payed attention to OnEndCommand.

@JohnM I tried many things including this workaround - I forgot to explain: in case of editing nested blocks “BlockEditApplyInPlaceEditItemChanges” fires for nested block while still in BlockEdit mode for parent block so it’s not possible to track it correctly using this command as it will fire code in command listener prematurely. Nothing has changed in that matter for years. Will ever BlockEdit be absorbed by Rhino? Meanwhile updating BlockEdit plugin with firing hidden empty command like “BlockEditTerminating” when BlockEdit dialog is closed would save a lot of headache. This is like 5 minutes of work including IDE opening.

There has been some discussion regarding a more robust BlockEdit replacement in Rhino 8 and the current plan is investigate what is possible. I can’t promise anything but am hopeful it will happen.

@JohnM thanks for input. Keeping finger crossed!