xspichx Posted October 24, 2011 Posted October 24, 2011 I have a client who has over 1,000 csv files, each file contains x,y,z and block name. Each csv represent one block type. Is there a way I can use a lisp to import these automatically without manually importing them one at a time? I've attached a sample csv with corresponding dwg. dga.txt edge of concrete1.txt fire hydrant.txt find.txt edge of unsurfaced driveway.txt edge asphalt.txt culvert.txt edge of concrete.txt 2DA9082D 10-20 AL.dwg Quote
ReMark Posted October 24, 2011 Posted October 24, 2011 Take a look at forum member Lee Mac's Point Manager v2-4.lsp found here....http://lee-mac.com/ptmanager.html Maybe it will be of some use to you. At least I hope so. Quote
xspichx Posted October 24, 2011 Author Posted October 24, 2011 that is what i am currently using. But I can only import one csv at a time. I'm wondering if there is someway we could do a batch import. Quote
ReMark Posted October 24, 2011 Posted October 24, 2011 I'd suggest sending a PM to Lee Mac and asking for a customization but don't expect to get something for nothing. At least make an offer of restitution. Quote
BIGAL Posted October 25, 2011 Posted October 25, 2011 1st step would be to write a combine files to make one big one with all of the blocks in it then point manager would work Its not hard when writing to a file you have a append option just read 1 one line from each one and append to a master file then can probably use LEE-Mac's program in one go. Theres various ways to make the list of TXT files the simplest is as follows START RUN CMD cd to where your txt files are then just DIR *.TXT >lsttxt /b you now have a text file list. the other way is using findfile. not tested (setq fout (open allpts "a")) (setq fo (open lsttxt "r")) (while (setq new_line (read-line fo)) (setq fo2 (open new_line "r")) (setq new_line2 (read-line fo2)) (write-line new_line2 fout) (close fo2) ) 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.