LISPs for coordinate systems

Discussion in 'AutoCAD' started by sasampson, Feb 1, 2007.

  1. sasampson

    sasampson Guest

    I was wondering if it was possible to take a site plan I have and
    generate a detailed coordinate list from the points on the plan. I am
    new to LISPs and was wondering what would be a good was to learn them
    and how to apply them as in the case that I want to use them for. any
    help would be much appreciated.
     
    sasampson, Feb 1, 2007
    #1
  2. You might want to start by brushing up on your syntax ; )
     
    Michael Bulatovich, Feb 2, 2007
    #2
  3. sasampson

    septicad Guest

    you would want to learn how to deal with selection sets, cycle though
    each selection set entity, and extract the 3d point information. The
    best way to start is to learn is by starting small. check out the
    literature on DXF codes for a point and examine the command line code
    below:


    Here is an example. I opened an empty DWG file, and created 2
    points... now I typed the follow commands on the command line and get
    the following responses.

    : (setq a (entnext))
    <Entity name: cbb5cf8>
    : (setq b (entnext a))
    <Entity name: ab03c08>
    : (entget a)
    ((-1 . <Entity name: cbb5cf8>) (0 . "POINT") (5 . "36") (67 . 0) (8 .
    "0") (62 . 256) (6 . "BYLAYER") (370 . -1) (48 . 1.00000) (60 . 0) (10
    8.58817 4.32759 0.000000) (39 . 0.000000) (210 0.000000 0.000000
    1.00000) (50 . 0.000000))
    : (entget b)
    ((-1 . <Entity name: ab03c08>) (0 . "POINT") (5 . "37") (67 . 0) (8 .
    "0") (62 . 256) (6 . "BYLAYER") (370 . -1) (48 . 1.00000) (60 . 0) (10
    8.23506 4.58804 0.000000) (39 . 0.000000) (210 0.000000 0.000000
    1.00000) (50 . 0.000000))


    DXF code # 10 is the point value (x,y,z)


    : (cdr (assoc 10 (entget a)))
    (8.58817 4.32759 0.000000)



    Now you want to do this to a huge file so, looping is nessasary

    steve
     
    septicad, Feb 14, 2007
    #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.