Was this helpful?
Terminate Method
You can use the Terminate method from one frame to stop the execution of another frame. If the frame you are terminating has any child frames, these are closed also. This method is useful when you want to close a frame that is currently inactive and you do not want to wait until the frame is active again. The syntax is:
FrameExec_var.Terminate()
You can use this method for any running version of a frame. To specify the FrameExec variable for the running version of the frame, use any of the methods described in SendUserEvent Method.
In the following example, the Terminate method is used to close the video_graphic window when the user switches the Graphics toggle on the View menu to off:
on click menu.view_menu.show_graphic =
begin
    if menu.view_menu.show_graphic = FALSE then
        graphic_frame.Terminate();
        graphic_frame = null;
If you want to catch any terminate requests and do some processing before the frame is actually closed, you can provide an event block for the Terminate event. The Terminate method triggers the Terminate event for the frame. For more information on the Terminate event, see the Language Reference Guide.
Note:  The Terminate event block cannot prevent the frame from being terminated. If you include a resume statement in the event block, OpenROAD ends the event block and terminates the frame.
Last modified date: 06/25/2024