Please HELP: need routine to export coordinates of UCS to text file

Discussion in 'AutoCAD' started by Alberto, Jan 21, 2004.

  1. Alberto

    Alberto Guest

    Hi everybody, I'm a novice user of AUTOCAD and I'm starting learning about
    AUTOLISP and Autocad customization...I need to export the transformation
    matrixes (a.k.a. the coordinates: origin and orientation) of some UCS to a
    text file to elaborate them with MATLAB...does anybody know how to retrieve,
    format and export those informations?

    Any help will be very appreciated

    Thanks a lot

    Alberto (preparing his mechanical engineering final thesis)
     
    Alberto, Jan 21, 2004
    #1
  2. Alberto

    P.C. Guest

    Hi

    This will be list code 210 when you pick an object with
    (entget(car(entsel)))

    You get the direction with (cdr (assoc 210 (entget(car(entsel)))))

    Guess you know how to write this to file.

    P.C.
    http://www.designcommunity.com/scrapbook/2992.html
     
    P.C., Jan 21, 2004
    #2
  3. Alberto

    Alberto Guest

    I need to export the transformation
    I'm sorry, but I couldn't understand ur answer, or maybe u've misunderstood
    my question...
    I'll try to explain it better with an example....

    Imagine to create a new UCS on a face of a solid (command: UCS/new/face...)
    and then to save it in the UCS's list (command: UCS/save...)... if U show
    the list of the saved UCSs (command: UCS/?/*) every saved UCS is followed by
    its origin and its spatial orientation (expressed by the cosins of the
    angles formed by each of the 3 axys of the UCS and the axys of the WCS) = 12
    values totally.

    What I need to do is to write down to a text file those 12 values with a
    LISP routine.

    Any suggestion?

    Thanks a lot

    Alberto
     
    Alberto, Jan 23, 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.