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
Values Returned
|
The user-defined callback function is not set and returns an error when: |
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
Return to top