PDA

View Full Version : Command for storing in old format?


robban
12-11-2002, 01:44 AM
Does anyone know the command for storing in old formats?

John van Doorn
12-11-2002, 02:19 AM
Robban,

You can put the following code into a lisp file e.g. bws.lsp

then at the command promp (load "<yourpath>/bws.lsp")
This will create a toolbar button, which from you van select the version you want to store to.

The setting will be for the whole session you are running, so every subsequent store will be in the format you've selected.

;Start of code
(in-package :cadservices)
(use-package :oli :mei)

(defconstant +bin-io-revision-at-load+ (bin-io-revision))

(sd-defdialog 'backward_store
:dialog-title "Backw Store"
:variables '(
(version-list :initial-value nil)
(Version
:title "Version"
:prompt-text "Choose a version"
:range (list +bin-io-revision-at-load+)
)
)
:local-functions '(
(fill-version-list ()
(setf version-list (mapcar #'first (bin-io-revision-list)))
(sd-set-range 'Version version-list)
)

(doit ()
(display "Warning: Use of this function is at own risk and is totally unsupported! ")
(display (format nil "Don't forget to reset the version to ~A ~%Otherwise it would be a permanent setting for this session" +bin-io-revision-at-load+))
(bin-io-revision Version)
)
)
:after-initialization '(fill-version-list)
:ok-action '(doit)
)

;end of code

Goodluck
John van Doorn

robban
12-11-2002, 04:48 AM
Thanks!

Robban

Jim McKim
12-11-2002, 09:35 AM
We put the following command in our startup file for v11.5 to store files in v9:

(BIN-IO-REVISION :MR-9-RELEASE)

which is a lot simpler than John's suggestion if that is all you want to do. The "9" can be changed to an "8".

This should also work if input from the command line.