Results 1 to 8 of 8

Thread: Double precision w/GETPOINT

  1. #1
    Member
    Join Date
    2005-04
    Posts
    4
    Login to Give a bone
    0

    Default Double precision w/GETPOINT

    I'm new to LISP but I was able to teach myself enough to write the program I need. I have a problem. I need to extract data from a civil drawing that uses coordinates where the y coordinatres are in excess of 1,000,000. when I extract the data using getpoint , the units are in single precision ( 8 characters). I need double precision. Is there a code to change precisions in getpoint???

    Thank you in advance.

  2. #2
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: Double precision w/GETPOINT

    Try setting the precision in the RTOS function to a high enough value:

    (strcat (rtos (car pt) lunits 15)
    ","
    (rtos (cadr pt) lunits 15)
    ","
    (rtos (caddr pt) lunits 15)
    )

  3. #3
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    0

    Default Re: Double precision w/GETPOINT

    Quote Originally Posted by todw
    Try setting the precision in the RTOS function to a high enough value:

    (strcat (rtos (car pt) lunits 15)
    ","
    (rtos (cadr pt) lunits 15)
    ","
    (rtos (caddr pt) lunits 15)
    )
    rtos will only go up to 9
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  4. #4
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Double precision w/GETPOINT

    Don't be worry
    The data is stored as a real, but the command line won't show full precision unless forced to:
    (getpoint ) ; <-- store real is OK
    (mapcar (function (lambda (r) (rtos r 2 16 ))) (getpoint )) ; <-- show string

    : ) Happy Computing !

    kennet

  5. #5
    Member
    Join Date
    2005-04
    Posts
    4
    Login to Give a bone
    0

    Default Re: Double precision w/GETPOINT

    I'm more of a newbie than I thought.

    I'm using ACAD r14 and can't find any reference to strcat nor lunits .

    All I get is "error bad argument type" .

    and will not run.

  6. #6
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Double precision w/GETPOINT

    we all are : )

    replace lunits with a integer corresponding to :
    1 Scientific
    2 Decimal
    3 Engineering (feet and decimal inches)
    4 Architectural (feet and fractional inches)
    5 Fractional

    (strcat "adds " "strings " "together" )

    : ) Happy Computing !

    kennet

  7. #7
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: Double precision w/GETPOINT

    Quote Originally Posted by lonfla
    I'm more of a newbie than I thought.

    I'm using ACAD r14 and can't find any reference to strcat nor lunits .

    All I get is "error bad argument type" .

    and will not run.
    http://www.amazon.com/exec/obidos/tg...68110?v=glance

    This is the best book I've seen to learn standard LISP through R14

  8. #8
    Member
    Join Date
    2005-04
    Posts
    4
    Login to Give a bone
    0

    Default Re: Double precision w/GETPOINT

    It finally all worked out.

    Thank you all for the help.

Similar Threads

  1. Another getpoint
    By gmiller.119448 in forum AutoLISP
    Replies: 3
    Last Post: 2008-04-01, 03:02 PM
  2. getpoint
    By gmiller.119448 in forum AutoLISP
    Replies: 5
    Last Post: 2008-03-22, 07:41 PM
  3. AEC precision vs Acad precision
    By jason.bell in forum CAD Management - General
    Replies: 0
    Last Post: 2008-02-25, 09:59 PM
  4. .GetPoint
    By wpeacock in forum VBA/COM Interop
    Replies: 1
    Last Post: 2006-05-09, 03:17 AM
  5. Using getpoint help
    By dsolak in forum AutoLISP
    Replies: 5
    Last Post: 2006-02-25, 05:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •