Product Documentation
Virtuoso Layout Suite SKILL Reference
Product Version IC23.1, November 2023

mgGetLayerSpacing

mgGetLayerSpacing(
d_instance1
d_instance2
t_referenceLayer
t_direction
x_spacing
)
=> x_effectiveSpacing / nil

Description

Returns the effective spacing between two instances, given the spacing between a reference layer inside the instances. For example, if the reference layer is Oxide_thk drawing, then x_spacing would indicate the spacing between the bounding box of the Oxide_thk layer inside the instances. The t_direction argument specifies the position of the instances relative to each other, either horizontal (next to each other) or vertical (above and below each other).

Arguments

d_instance1

The database ID of the first instance.

d_instance2

The database ID of the second instance.

t_referenceLayer

The reference layer inside the instances. The reference layer is a string in the form <layer> <purpose>.

t_direction

The direction in which spacing is measured. The direction can be horizontal or vertical.

x_spacing

The spacing between a reference layer inside the instances.

Value Returned

x_effectiveSpacing

The effective spacing between two instances specified in the function.

nil

The operation failed.

Example

Returns the effective spacing between the two instances.

mgGetLayerSpacing(      
inst1
inst2
    "Oxide_thk drawing"
    "horizontal"
    0.5
)
=> -0.3

Return to top
 ⠀
X