Automatically saving the current model before CoCreate Modeling terminates

You can subscribe to the *SD-TERMINATE-EVENT* and execute a function which saves all currently loaded assemblies and parts. Here's a very simple example.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Description:  Saves model before CoCreate Modeling terminates
;; Author:       Claus Brod
;; Created:      1/14/2005 19:20    
;; Language:     Lisp
;;
;; (C) Copyright 2005 Claus Brod, all rights reserved
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
(defun exit-fun(arg &rest args)
  (save_package :recursive :all_at_top 
                :FILENAME (format nil "~A/exitsave.pkg" (oli:sd-inq-temp-dir)) :overwrite))

(oli:sd-subscribe-event oli:*SD-TERMINATE-EVENT* 'exit-fun)

Note that it is not clearly defined which parts of the termination CoCreate Modeling has already performed when it processes the *SD-TERMINATE-EVENT*, so try to do as little as possible.

-- ClausBrod - 14 Jan 2005


When asked for a TWiki account, use your own or the default TWikiGuest account.

to top

You are here: CoCreateModeling > OsdmMacros > MacroTerminateEvent

r1.5 - 24 Jul 2009 - 20:00 - ClausBrod to top

CoCreateModeling
CoCreate ModelingRSS
FAQ
  Introduction
  Hardware
  Operating system
  Memory management
  File handling
  Installation
  Licensing
  Graphics
  App. knowhow
  Lisp
    Learning
    Programming
    Debugging
    DDE
    Compiler
    Customization
  Troubleshooting
  Links
Code examples
Viewbench
News
Changes
Index
Search
Impressum
Home

  • My links
  • Show me topics of interest

TWiki

Welcome


TWiki Web TWiki Web Home Changes Topics Index Search


TWiki Webs Atari Blog Main OneSpaceModeling? Sandbox TWiki TWiki Webs Atari Blog Main OneSpaceModeling? Sandbox TWiki

Jump:

Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback