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

gpeRunPresetGen

gpeRunPresetGen(
t_functionName
d_figGroupId
)
=> t / nil

Description

Invokes the specified preset generator function on the active figGroup. The figGroup is updated according to the preset generator logic. Ensure that the Grid Pattern Editor (GPE) assistant is open when running this command. Also ensure that the selection argument specifies a valid Modgen figGroup and that the preset is registered correctly.

Arguments

t_functionName

Name of the preset generator function to be invoked.

d_figGroupId

Database ID of the currently active figure group.

Value Returned

t

The preset generator function was invoked.

nil

The preset generator function could not be invoked.

Example

In the following example, first the preset function is defined. Custom checks are performed on the preset function to determine when the preset function has to be displayed. Finally, the preset function is registered.

procedure(test_preset(sbox @optional selection) print("Hello world"))
=> test_preset
gpeUnregisterPresetGen("test_preset")
=> t
gpeRegisterPresetGen("gen1" "test_preset" "")
=> t
gpeRunPresetGen("gen1" css())
=> Hello world
=> nil

Return to top
 ⠀
X