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

gpeIsRegisteredPresetGen

gpeIsRegisteredPresetGen(
t_functionName 
)
=> t / nil

Description

Checks whether the specified function is a registered preset generator function.

Arguments

t_functionName

Name of the function that needs to be checked for registry.

Value Returned

t

The function is a registered preset generator function.

nil

The function is not a registered preset generator function.

Example

The following procedure first defines a preset generator function. Custom checks are performed to determine when the preset function has to be displayed. There are two tests performed. The first one after registration, where the return value is t. The second one is when the function is unregistered and tested. Here, the return value is nil.

procedure(test_preset(sbox @optional selection) print("Hello world"))
=> test_preset
gpeUnregisterPresetGen("test_preset")
=> t if registered; nil if not registered
gpeRegisterPresetGen("gen1" "test_preset" "")
=> t
gpeIsRegisteredPresetGen("test_preset")
=>t
gpeClearPresetGenerators() 
=> t
gpeIsRegisteredPresetGen("test_preset") 
=> nil

Return to top
 ⠀
X