EDA Solutions logo

Archive

Latest update: 12/06/2022

Relevant product(s): S-Edit
Operating systems: Windows/Linux
Versions affected: All
Relevant area(s): Automation

Summary

It is often that users need to search for objects that match specific attributes and modify them in S-Edit. Instead of creating a script to do so, users can easily use the “Find” window to set up search parameters using the GUI and then add additional search filters and modifications using Tcl commands, reducing the overall need for scripting. This article discusses how to use this feature.

Details

In S-Edit, open the Find window by clicking Edit>Find… or pressing the hotkey Ctrl+F.

The following window will show, asking for search options.

At the bottom of this window, there are two windows that read Tcl commands; The top field allows for advanced filtering and the bottom field allows for modification to matched cells using Tcl.

For more details on setting up search options in the Find window, please refer to “Find Navigator” in the Tanner™ S-Edit™ User’s and Reference Manual.

Filtering using Tcl

Tcl commands in the “Filter” field are evaluated individually on each object that is within the set scope.

S-Edit expects a boolean value as a number (0 or non-zero) or a boolean expression (true or false). This value determines whether the object in consideration matches the search parameters.

This can be used to search for parameters in instances. To do so, search for all instances and then apply a Tcl search filter. The following example demonstrates by selecting all the instances that have an “l” property between 300n and 350n inclusive.

set length [ property get l -double -nowarn ]
expr { 0.25e-6 <= $length && $length <= 0.35e-6 }

Modifying selections using Tcl

The “Modify” field uses Tcl commands to perform actions on elements that are selected from the search. The script is applied in the context of one element at a time. For example, the script below flips and moves the instances with instance name ending in “2”:

draw flip
set Y [ property get Y -system ]
property set Y -system -value [expr {$Y - 100}] -units iu

References

Find Navigator Documentation

https://docs.sw.siemens.com/en-US/doc/862138555/202208059.sedit_user/id0d84ea19-ab3f-4dc9-9f4d-f2692bb42d90