Questions From A New AutoLISP User

Discussion in 'AutoCAD' started by Sunburned Surveyor, Oct 26, 2004.

  1. I am a new user of AutoLISP, and I had some rookie questions that I couldn't find in any of my AutoLISP references. I appreciate any help with the questions.

    Question #1: There is a 132 character limit on string data types in AutoLISP. Is there any wah around this? If I need to accept a larger string from the user, should I import a standard text file?

    Question #2: Can you store LISP statements in a string and then use that string later in the LISP routine or in another routine? If so, how would you do this? (I want to be able to choose and Execute LISP statements stored in a Iist.)

    Question #3: How does AutoCAD determine the format of the angle entered by the user as an argument of the getangle function? Is it determined by the current Angle Unit Settings?

    Thanks again for any assistance.

    The Sunburned Surveyor
     
    Sunburned Surveyor, Oct 26, 2004
    #1
  2. Sunburned Surveyor

    James Allen Guest

    Q2: (eval (read "(<your lisp here>)"))
    --
    James Allen
    Malicoat-Winslow Engineers, P.C.
    Columbia, MO

    couldn't find in any of my AutoLISP references. I appreciate any help with
    the questions.
    AutoLISP. Is there any wah around this? If I need to accept a larger string
    from the user, should I import a standard text file?
    string later in the LISP routine or in another routine? If so, how would you
    do this? (I want to be able to choose and Execute LISP statements stored in
    a Iist.)
    the user as an argument of the getangle function? Is it determined by the
    current Angle Unit Settings?
     
    James Allen, Oct 26, 2004
    #2
  3. Sunburned Surveyor

    Murph Guest

    Sunburned Surveyor,

    I bet you are wanting to bring points in from a survey into a dwg.
    1. Look at using text files. Check out the open read-line and close
    functions.
    2. Store the "string" as a variable like (setq mystr "ABC 1 2 3 my stuff")
    then anytime you need that info use the variable mystr.
    3. Angles are measured in Radians.

    Murph

    couldn't find in any of my AutoLISP references. I appreciate any help with
    the questions.
    AutoLISP. Is there any wah around this? If I need to accept a larger string
    from the user, should I import a standard text file?
    string later in the LISP routine or in another routine? If so, how would you
    do this? (I want to be able to choose and Execute LISP statements stored in
    a Iist.)
    the user as an argument of the getangle function? Is it determined by the
    current Angle Unit Settings?
     
    Murph, Oct 26, 2004
    #3
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.