Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

dbSetShapeColor

dbSetShapeColor(
d_shapeId
t_maskColor
)
=> t / nil

Description

Assigns the specified color to the given shape if the color state is unlocked.

If you try to set the color of a non-colorable shape, or if the layer associated with the shape is unbound or does not support coloring, the function results in an error.

Arguments

d_shapeId

Specifies ID of the shape whose color is to be set.

To check the shape's colorability use dbIsShapeColoringAllowed.

t_maskColor

Color to be set for the shape.

Valid values: grayColor, mask<mask number>Color, where <mask number> is 1, 2, and so on, up to the number of masks defined in the technology library for the layer.

Value Returned

t

Returns t if the function runs successfully.

nil

Returns nil if there is an error.

Example

dbSetShapeColor(coloredRect "mask1Color" ) => t
dbGetShapeColor(coloredRect) => "mask1Color"

Return to top
 ⠀
X