paiboon-m Posted January 20, 2010 Posted January 20, 2010 Dear all of CADtutor Friend I just new member, and need help from someone Who have some autolisp or technic how to Convert AutoCAD (Text) to Excel, help me please Quote
Strix Posted January 20, 2010 Posted January 20, 2010 have you had a look through some of our old threads? I'm fairly certain we've been asked this before it isn't a good idea to post your email address on the internet btw - it can be harvested and used for all kinds of things you don't want to receive! Quote
paiboon-m Posted January 20, 2010 Author Posted January 20, 2010 Thank you very much Strix, Let me find that old question Quote
fuccaro Posted January 20, 2010 Posted January 20, 2010 A simpler way would be to output from AutoCAD in a so called CSV file. It can be opened in Excel too. Quote
paiboon-m Posted January 20, 2010 Author Posted January 20, 2010 Dear Fuccaro I found some Autolisp code below, But only 1 problem this code read and sort from bottom to top How I modify this code read Text from Autocad Then show to Excel from top to Bottom Thank and Regard Sir. (defun c:ttx ( / xlCells xlSheet xlSheets xlBook xlBooks xlApp column row drac ss ent expo x) (vl-load-com) (setq xlApp (vlax-get-or-create-object "Excel.Application") xlBooks (vlax-get-property xlApp "Workbooks") xlBook (vlax-invoke-method xlBooks "Add") xlSheets (vlax-get-property xlBook "Sheets") xlSheet (vlax-get-property xlSheets "Item" 1) xlCells (vlax-get-property xlSheet "Cells")) (vla-put-visible xlApp :vlax-true) (setq column 1 row 1 drac -1 ss (ssget "_X" (list (cons 0 "*TEXT")))) (repeat (sslength ss) (setq ent (ssname ss (setq drac (1+ drac))) expo (vla-get-textstring (vlax-ename->vla-object ent))) (if ( (vlax-put-property xlCells "Item" row column expo) (progn (setq row 1 column (1+ column)) (vlax-put-property xlCells "Item" row column expo) ); /else progn ); /if (setq row (1+ row)) ); /repeat (mapcar (function (lambda(x) (vl-catch-all-apply (function (lambda() (progn (vlax-release-object x) (setq x nil))))))) (list xlCells xlSheet xlSheets xlBook xlBooks xlApp)) (alert "Close Excel file manually") (gc)(gc) (princ) )magic Quote
devitg Posted January 20, 2010 Posted January 20, 2010 You can use DATAEXTRACTION too , it will do all hard work. No code needed Quote
Ammarbokhari Posted April 6, 2011 Posted April 6, 2011 Can you please tell me how this DATAEXTRACTION work? ? Quote
devitg Posted April 6, 2011 Posted April 6, 2011 Just follow de Dialog box instructions , and use the help Type DATAEXTRACTION at the command line . Quote
Ammarbokhari Posted April 6, 2011 Posted April 6, 2011 thank you, but it does not copy all the details to excel file and also the order is not what it should be. what i need is to copy all the data in an autocad file and create a table in excel but dataextraction arranges all the values in single column which is not what is required. (formatting etc can be taken care of later). please help Quote
Ammarbokhari Posted April 6, 2011 Posted April 6, 2011 Can I get these details in coma separated format? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.