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

gpeSetGrid

gpeSetGrid(
u_sandbox
l_grid
[ ?verbose { t | nil } ]
)
=> t / nil

Description

Sets the entire grid without using individual grid entries. You can also use this function to update grid placement by providing a list of lists describing the row placement of instances.

Specifying value nil for g_grid clears all grid entries.

Arguments

u_sandbox

Specifies a Modgen sandbox object.

l_grid

Specifies the new DPL or a list of lists that contains the entire pattern. The first list is a list of rows. Each row list is a list of names of symbols, column-by-column. A sandbox grid is created based on this one argument.

Example:

grid = list(

list("A" "A" "A" "A" "A")

list("A" "A" "B" "A" "A")

list("A" "B" "C" "B" "A")

list("A" "A" "B" "A" "A")

list("A" "A" "A" "A" "A")

)

Rows are specified from row 0 upward, where row 0 is the first row, followed by row 1, and so on. The following special characters are valid:

  • "*": Indicates the dummy symbol. Example: list(list("A" "*" "A" "A") list("B" "B" "*" "B"))
  • "", " ", "-", "\t", and "nil": Indicate an empty cell in the grid. Example: list(list("A" "*" "A" nil "" "-" "\t" "A") list("-" nil "\n" "" " " "B" "B" "B"))
  • "nil" as a row value: Indicates that the row is empty. Example: list(list("A" "*" "A" "A") nil list("B" "B" "*" "B"))

?verbose { t | nil }

Controls the display of warning messages.

Value Returned

t

The Modgen sandbox grid was created.

nil

Could not create a Modgen sandbox grid.

Example

The value for sbox is assigned to the value returned by gpeEditSandbox. grid1 identifies a sandbox grid DPL which holds the current grid placement of sbox. grid2 is a grid created using the specified arguments:

sbox = gpeEditSandbox()
=> pe:#####
grid1 = gpeGetGrid(sbox)
grid2 = list( list("A" "A" "B") list("D" "B" "C") list("B" "C" "D") )

In the following example, a Modgen sandbox object is created based on values of sbox and grid2 defined above:

gpeSetGrid(sbox grid2)
=> t

In the following example, a Modgen sandbox object is created based on values of sbox and grid1 defined above:

gpeSetGrid(sbox grid1)
=> t

Return to top
 ⠀
X