End a set of commands that can be undone/redone as a group
Syntax
endgroup [‑quiet] [‑verbose]
Usage
Name | Description |
---|---|
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
Categories
Description
Ends a sequence of commands that can be undone or redone as a series. Use startgroup
to start the sequence of commands.
You can have multiple command groups to undo
or redo
, but you cannot nest command groups. You must use endgroup
to end a command sequence before using startgroup
to create a new command sequence.
Tip: The
startgroup/endgroup
commands are provided to support sequences of related commands that can be undone via the undo
command, or redone if needed using the redo
command. However, some Tcl commands can trigger an endgroup
unexpectedly, and certain commands do not support either UNDO
or REDO
. The limitations are not fully defined.Arguments
-quiet
- (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose
- (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the
set_msg_config
command.Examples
The following example defines a startgroup
, executes a sequence of related commands, and then executes the endgroup
. This sequence of commands can be undone as a group:
startgroup
create_pblock pblock_wbArbEngine
create_pblock pblock_usbEng
add_cells_to_pblock pblock_wbArbEngine \
[get_cells [list wbArbEngine]] -clear_locs
add_cells_to_pblock pblock_usbEng \
[get_cells [list usbEngine1/usbEngineSRAM]] -clear_locs
endgroup