Results 1 to 7 of 7

Thread: need lisp routine input a data in CAD

  1. #1
    Member xfirez's Avatar
    Join Date
    2003-10
    Location
    Asia
    Posts
    19

    Exclamation need lisp routine input a data in CAD

    need a routine lisp for export a data from excel to autocad..
    here is the sample from excel files..



    here is the result from excel


    please help me.
    donno how to dis
    but i'll do my best

  2. #2
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2007-07
    Location
    Jo'burg SA
    Posts
    4,344

    Default Re: need lisp routine input a data in CAD

    Check under this link: http://asmitools.com/Files/Programs.html

    The tabcoord.lsp creates a table which you can export to Excel. Or you could modify it to rather save to CSV file. If you want it directly into XLS you'll need to look at Excel's ActiveX interface.

    Edit ... sorry scratch that ... read too fast ... you want it the other way
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  3. #3

    Post Re: need lisp routine input a data in CAD

    Oliver,
    This one covers importing and extracting 3D points between Excel and AutoCAD.
    http://autolisp-exchange.com/Forums/.../F3T5P4.htm#31
    Here's the link for the latest version of GetExcel.lsp:
    http://web2.airmail.net/terrycad/LISP/GetExcel.lsp

  4. #4
    Member xfirez's Avatar
    Join Date
    2003-10
    Location
    Asia
    Posts
    19

    Default Re: need lisp routine input a data in CAD

    Quote Originally Posted by Terry Cadd View Post
    Oliver,
    Here's the link for the latest version of GetExcel.lsp:
    http://web2.airmail.net/terrycad/LISP/GetExcel.lsp
    how to apply..?
    donno how to dis
    but i'll do my best

  5. #5

    Post Re: need lisp routine input a data in CAD

    Oliver,
    Based upon the format of your Excel spread sheet in your first post, the following code will work. Change the Excel filename and path to the filename and path you used. Load GetExcel before you run the example. i.e. (load "GetExcel")

    Code:
    (defun c:TempPts (/ Row@)
      (GetExcel "C:\\Temp\\TempPts.xls" nil nil);<-- Change Excel filename and path here
      (command "_PLINE")
      (foreach Row@ (cdr *ExcelData@)
        (command (list (atof (cadr Row@)) (atof (caddr Row@))))
      );foreach
      (command "_c")
      (princ)
    );command

  6. #6
    Member xfirez's Avatar
    Join Date
    2003-10
    Location
    Asia
    Posts
    19

    Question Re: need lisp routine input a data in CAD

    Quote Originally Posted by Terry Cadd View Post
    Oliver,
    Based upon the format of your Excel spread sheet in your first post, the following code will work. Change the Excel filename and path to the filename and path you used. Load GetExcel before you run the example. i.e. (load "GetExcel")

    Code:
    (defun c:TempPts (/ Row@)
      (GetExcel "C:\\Temp\\TempPts.xls" nil nil);<-- Change Excel filename and path here
      (command "_PLINE")
      (foreach Row@ (cdr *ExcelData@)
        (command (list (atof (cadr Row@)) (atof (caddr Row@))))
      );foreach
      (command "_c")
      (princ)
    );command
    any other solution?
    donno how to dis
    but i'll do my best

  7. #7
    100 Club hofcad's Avatar
    Join Date
    2005-09
    Posts
    111

    Default Re: need lisp routine input a data in CAD

    Last edited by hofcad; 2010-01-20 at 05:35 PM.

Similar Threads

  1. Replies: 16
    Last Post: 2007-05-16, 01:20 AM
  2. LISP Routine to get Object Data
    By gisdude in forum AutoLISP
    Replies: 1
    Last Post: 2007-05-01, 07:55 PM
  3. Replies: 1
    Last Post: 2007-04-07, 12:39 PM
  4. Replies: 6
    Last Post: 2006-10-16, 05:29 AM
  5. Multiple data input
    By cadconcepts in forum AutoLISP
    Replies: 1
    Last Post: 2005-10-05, 06:50 PM

Posting Permissions

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