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

dbSetAutoSaveCallback

dbSetAutoSaveCallback(
t_callback
)
=> 't / nil

Description

Enables a user-defined callback function to control the frequency at which large designs are auto-saved. When set, the user-defined callback function is called just before the design is about to be auto-saved.

The user-defined function can be registered only once, usually in the start-up script before calling the dbSetAutoSave function.

Arguments

t_callback

Name of the callback function.

Values Returned

t

The user-defined callback function is set.

nil

The user-defined callback function is not set and returns an error when:

  • A user-defined callback function is already set.
  • No user-defined callback function is found.
  • The user-defined callback function is incorrectly defined.

Examples

In this example, the as_func callback function is defined. This function returns t every time it is invoked. Next, the auto-save feature is enabled by registering this callback function.

as_var = 0
 (defun as_func ( design )
   ( let (res remnt)
     as_var = as_var + 1
     res = nil
     remnt = as_var - (as_var / 2 * 2)
     (if (remnt == 0) res = t)
     res))
dbSetAutoSave(t)
 dbSetAutoSaveCallback("as_func")
Here, the auto-save period of a single design increases by factor a of 2.

You should examine the design size and configure a delay in auto-save only for those designs that larger then several megabytes.

Related Topics

dbSetAutoSave


Return to top
 ⠀
X