Variable input in mapcar function

Discussion in 'AutoCAD' started by RaghuMN, Dec 4, 2004.

  1. RaghuMN

    RaghuMN Guest

    Hi all,

    About getting the points that lies around a point (mipt) with a buffer of 0.3 is as given below:

    (cons -4 "<AND")
    (cons -4 ">=,>=,>=")(cons 10 (mapcar '- mipt '(0.3 0.3 0.3)))
    (cons -4 "<=,<=,<=")(cons 10 (mapcar '+ mipt '(0.3 0.3 0.3)))
    (cons -4 "AND>")

    If I have to get the same result with a variable that replaces 0.3, it does not work.

    That is,

    (cons -4 "<AND")
    (cons -4 ">=,>=,>=")(cons 10 (mapcar '- mipt '(a a a)))
    (cons -4 "<=,<=,<=")(cons 10 (mapcar '+ mipt '(a a a)))
    (cons -4 "AND>")
    where a = 0.3.

    How to use a variable in this kind of situation?

    Thanks for any suggestions.

    MNRaghu
     
    RaghuMN, Dec 4, 2004
    #1
  2. RaghuMN

    Jeff Mishler Guest

    Change the '(a a a) to (list a a a)
     
    Jeff Mishler, Dec 4, 2004
    #2
  3. RaghuMN

    Fatfreek Guest

    And then search for what, Jeff?

    Len


     
    Fatfreek, Dec 4, 2004
    #3
  4. RaghuMN

    Jeff Mishler Guest

    Huh? Raghu didn't ask anything about searching. He only requested to know
    how to pass a variable inside a mapcar function, nothing else......
     
    Jeff Mishler, Dec 4, 2004
    #4
  5. RaghuMN

    Fatfreek Guest

    Oops -- sorry, Jeff. I never noticed the top line (your actual response) of
    your message. My duuhhh!!
    Len
     
    Fatfreek, Dec 4, 2004
    #5
  6. RaghuMN

    RaghuMN Guest

    Thank you very much Jeff. That was very simple AFTER You told me!


    MNRaghu
     
    RaghuMN, Dec 6, 2004
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.