DEEPAKRAJ Posted April 15, 2012 Posted April 15, 2012 Dear Lee, i need a lisp which can convert the layers from excel to autocad. please do the needful. note :- the layers,colour and linetype are only given in text forum. Quote
BlackBox Posted April 15, 2012 Posted April 15, 2012 (edited) Dear Lee, i need a lisp which can convert the layers from excel to autocad. please do the needful. note :- the layers,colour and linetype are only given in text forum. Please stop requesting that someone write code for you. Edited April 17, 2012 by BlackBox Quote
BIGAL Posted April 17, 2012 Posted April 17, 2012 Simple in excel layname colour linetype new column "-la N layname c colour Lt linetype" repeat as required Either save the column into notepad then save as a script file or copy column and paste direct to Autocad command line. Quote
BlackBox Posted April 17, 2012 Posted April 17, 2012 Perhaps the similar threads below will yield a potential solution. Quote
Bill Tillman Posted April 17, 2012 Posted April 17, 2012 I have toyed around with reading Excel files from LISP/VLISP and while it works quite well, it's a rather laborious task and seems slow to execute. Reading a text file with LISP/VLISP is really fast and it's much easier to code. The project I'm working on initially started out reading everything from the Excel file, but we ditched this method in favor of having VBA write the data from Excel to a text file. The VBA code then loaded the needed references and then launches AutoCAD and loads and executes the VLISP code. This VLISP code then reads the text file written by VBA and it's off to the races. I would suggest you follow the advice from BIGAL and either use a script or dump the layers and properties from Excel to a text file. You might need to do a little formatting first, but once the file is in order you could either read it or incorporate it in your LISP code to create the new layers. Quote
BlackBox Posted April 17, 2012 Posted April 17, 2012 ... .CSV (using either "," of "\t") is your friend. Quote
BlackBox Posted April 17, 2012 Posted April 17, 2012 In the spirit of adding yet another hint... Perhaps this old thread may be of use. 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.