×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Lsp Default setting How do you set it up ??

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.

if everyone helps everybody the world will be a better place

RE: Lsp Default setting How do you set it up ??

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources