Hide block selection dialog on bedit command

435 Views Asked by At

I need to open block editor for block by its name, so I execute command in this way:

document.SendStringToExecute("_BEDIT "+blockName+"\n", true, false, false); 

After running this line of code "selection of block" dialog appears, but I need the block to be selected automatically. So is there any way to run into block editor state without any dialog? I have not found any method to run block editor without using command line and there is no system variable found to make dialog disappear.

1

There are 1 best solutions below

1
On BEST ANSWER

Solved it. Just took some playing around. Enclose the operation in a lisp command, passing the block name after the BEDIT command and you're golden.

(Command "BEDIT" "ExampleBlock")

So in the context of SendStringToExecute it would be something like this:

document.SendStringToExecute("(Command \"._BEDIT\" \"" + blockName + "\"\n)", true, false, false);