Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

Examples

To create a object, point a variable to it, and save it in a file:

(send CLASS-GRAPHIC-FILE :new "myfile.lsp")
(setq myobj (send CLASS-any :new ...))
(setq fd (xfil-save-graphics-file "myfile.lsp"))

;;; Code to restore 'myobj' variable when file is loaded:
(format fd "(setq myobj "))
(XFIL-WRITE-SEXP-TO-FILE myobj fd)
(format fd ")~%")

;;; Close output file:
(close fd)

To clear the above object and file object out of memory:

(XFIL-UNLOAD-GRAPHICS-FILE "myfile.lsp")
(setq myobj nil)

To load the preceding file:

(XFIL-LOAD-GRAPHICS-FILE "myfile.lsp")

Go to the first, previous, next, last section, table of contents.