The purpose of this script is to help users assign face offset values to make rat lines in layout go away. Any layout object that is associated with a schematic item can assign offsets to face locations to change where rat lines will draw to that object. You access these settings by selecting an item in layout, right clicking and selecting Shape Properties, selecting the Faces tab as shown below.
The default setting for the Face Justification setting is Center. By changing this setting to Offset you can now enter offset values for x, y and an angle. After any changes, rat lines will draw to this new location and snapping will also use this new location.
The manual entry of these values can be somewhat confusing. The values you enter will always be the same regardless of the rotation angle of the items. This makes sense as you would not want the relative face offsets to change if you rotate objects. This means that you cannot just measure the offset in the layout and then apply those values. Historically, you had to try different combinations to get this to work right.
This script fixes the problem of entering this values by figuring them out automatically. To use this script, you must select two layout objects a layout that are connected in the schematic implying they have rat lines drawing between the layout objects. You can ONLY select two objects at a time. You then run the script and the rat line between the items will be removed. A data file named "Face_Snap_Log" is added to the project to list out exactly what changes were made to the project.
For example, consider the layout below.
The face settings for the Face 2 of the left microstrip line layout originally has these settings.
Then the two layout items are selected.
Then the script is run and the rat line between them is removed.
The face settings for the same line are now changes as shown below.
Finally, the "Face_Snap_Log" has this data.
Log for Script that will adjust face offsets for currently selected items to make rat lines go away Change made on 10/16/2012 at 3:47:23 PM changed element: MLIN.TL1 in schematic: Schematic 1 Face Offset type changed from Center to Offset Offset X changed from 0um to -10um Offset Y changed from 0um to 12um