Lsp Default setting How do you set it up ??
Lsp Default setting How do you set it up ??
(OP)
This is what i was told on one of the news groups but he didnt go into details but it sounds like there is more than one way if anyone has an example of this and can explain it i think it might benifit all :)
>wondered how it was done
One way is to use a dictionary.
>wondered how it was done
One way is to use a dictionary.
if everyone helps everybody the world will be a better place





RE: Lsp Default setting How do you set it up ??
Sam doing what you want to do is just a matter of creating variables that
are not destroyed once the routine is finished and then checking their value
when first run. See my example below. I hope this helps.
(defun c:myLisp(/ varToBeDeleted)
;; varToBeSaved is only assigned a value if it hasn't
;; ever been initialized. This value is only nil the first
;; time the routine is run during this drawing session.
;; After that the value is kept for the duration of the
;; drawing session.
(if(= varToBeSaved nil)
(setq varToBeSaved "Default Value Goes Here")
)
;; varToBeDeleted is always nil because it is deleted
;; each time the routine exits. This is because I have
;; included it in the variable list above.
(setq varToBeDeleted "Initialize Variable Here")
)
if everyone helps everybody the world will be a better place