Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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)
)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...