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.
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.
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))
schStretch(figs newXform)
Arguments
Value Returned
Examples
To use the schStretch() command, you can take the following steps:
- Open a schematic that contains some instances.
- Select the objects that you wish to stretch
- 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
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