Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lsp Default setting How do you set it up ??

Status
Not open for further replies.

shadow

Computer
Mar 1, 2001
321
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.

if everyone helps everybody the world will be a better place
 
Replies continue below

Recommended for you

found this later after i posted a couple of things :)

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor