Product Documentation
Virtuoso Schematic Editor SKILL Functions Reference
Product Version IC23.1, November 2023

schStretch

schStretch( 
l_figIds
l_transform
)
=> t / nil

Description

The schStretch command can be used to stretch objects. The API takes a list of figIds and a transformation, and then stretches the specified figure in figId~>cellView by applying the transformation.

schStretch is a non-HI equivalent of schHiStretch.

The schStretch function has no requirement for a cellview to be open in a window, and can operate successfully when the cellview is opened using dbOpenCellViewByType.

The schStretch function also follows the same constrains as those followed by schHiStretch (for example, the error messages are the same and all environment variables are obeyed).

The stretching behavior performed is also similar to that used by schHiStretch, and you are able to control the stretch behavior using the environment variable stretchMethod.

There is however one important difference, where stretching is performed within the cellview of the figId (figId~>cellview). For instances (symbol and schematic), wires, markers, patch cords, pins, pin and wire names, and so on, that are placed on the scematic, the stretching is done in that schematic cellview. If however you specify the figId of some object that is in a symbol (figId of a symbol pin), that would be stretched inside a symbol. In this scenario, the behavior would be the same as schMove.

With object stretching, the reference point is taken as the origin. The figIds are stretched in their totality, as if in fully selected mode, in the same way that schCopy and schMove works.

As the stretching reference point is always the origin, if you want a different origin, you will need to adhere to the following example:

If xy is the reference point that you want to use, and xform is the transformation relative to that reference point, then:

newXform=dbConcatTransform(
dbConcatTransform(
list(mapcar('minus xy) "R0" 1) xform)
list(xy "R0" 1))

And then do:

schStretch(figs newXform)

Arguments

l_figIds

The list of ids of the objects to be stretched together. All objects must belong to the same cellview. Only objects in the schematic or schematicSymbol view types are stretched. The cellview type for stretching is determined by checking the cellview of the first object in the l_figIds.

l_transform

Specifies the relative location, orientation, and optionally magnification of the moved figure, specified as a list of the form:

( l_offset t_orient [ n_magnification ] )

Where:

l_offset is the offset from the original position expressed as a list of two floats, the first specifying the distance to move in the x direction and the second the distance in the y direction; for example (10.0:5.0).

t_orient specifies the orientation of the moved object and is one of R0, R90, R180, R270, MX, MXR90, MY, MYR90. The value must be enclosed in double quotes.

n_magnification specifies the relative size of the moved object. The default is 1.0 (i.e. the same size as before the move).

Value Returned

t

Stretch operation has been successful.

nil

Stretch operation has been unsuccessful.

Examples

To use the schStretch() command, you can take the following steps:

  1. Open a schematic that contains some instances.
  2. Select the objects that you wish to stretch
  3. In the CIW enter:

figIds = geGetSelSet()
trans = list (0:0 "R90")
schStretch (figIds trans)

This first of all gets a list of the selected figIds, rotates the instances by 90, before then performing the stretch.99

Alternatively you could:

  1. Open a schematic that contains some instances.
  2. In the CIW enter:

cv = geGetEditCellView()
figIds = cv~>instances
trans = list (-1:-1 "R90")
schStretch(figIds trans)

Firstly, this gets the cvId for the current window, then gets a list of figIds (in this example it is instances), before moving them by 90 and then by (-1 -1). The last step again sees the stretch being performed.


Return to top
 ⠀
X