Importing .CSV data into AutoCAD LT 2018

Importing .CSV data into AutoCAD LT 2018

Anonymous
Not applicable
4,400 Views
6 Replies
Message 1 of 7

Importing .CSV data into AutoCAD LT 2018

Anonymous
Not applicable

Hi, I know this topic has been asked in various ways and I have read through and tried to understand the solutions but my understanding is quite limited. I am quite rusty with AutoCAD, havn't used any sort CAD programmes in over a decade. My excel use is moderate, but I get lost when someone start talking about scripts and macros (people seem to write about them as if everyone knows what they are on about but it just goes over my head, most I've understood is paste something into notepad but I don't see how that becomes a script).

 

I have a .csv file with local co-ordinates and am trying to use this to create an as-built for piling operations, so just want to plot the points. there are a lot of them so would be very time consuming to do this manually.

 

I have attempted a few solutions that I have found on the forums but to no avail, closest I got was when I created a column for the Concantation etc. but when I've imported it to the command line in AutoCAD LT 2018 it doesn't do anything except open internet explorer and take me to online help. When I use PLINE and import the data into the command line, I obviously just get a load of lines going all over the place when in actuality I need just points being marked. Tried using Circle command, copied in the data in the command line and it just pasted the cells as text instead.

 

I have a gut feeling that once I can overcome the above and get points inserted, I can then adapt the concantation command to include the column diameter for the point size? But would anyone also know if there is a way to import the date installed information, like colour code them for example? If not I will just do that manually.

 

Another thing, is it possible to also have autoCAD import the depths as a text under the corresponding point?

 

The .CSV file has come off the rig, once converted into columns in excel it has Point no, X & Y co-ordinates, diameter, time installed, date installed, concrete used and lots of other information that has no use to me.

 

Apologies for my noobness and thank you in advance for any help.

0 Likes
Accepted solutions (1)
4,401 Views
6 Replies
Replies (6)
Message 2 of 7

steven-g
Mentor
Mentor

Can you post a copy of the excel file with the added column you are using to paste into AutoCAD so we can see if there is a problem there. But from the sound of it one of your problems is that the command line in AutoCAD isn't actually active when you paste the information. You should see the cursor blinking on/off in the command line, which often means you have to leave the mouse hovering inside the command line. If you don't do that then the cursor becomes active in your drawing again and pressing Ctrl=v will then paste the excel cells as an ole object in your drawing, which is what you are describing.

0 Likes
Message 3 of 7

Anonymous
Not applicable

Hi Steven,

 

Thank you for your reply, I had noticed that the command line became inactive at the time of attempting it but am pretty sure I went to the effort of ensuring it was. For further explanation, when I pasted directly into the command line on it own, AutoCAD definitely looked as if it was doing something with each point (flashes of loading cursor and command line history moving) until it decided that '334' or something wasn't a recognised command and open online help. When I went back to the drawing and was nothing there. When I used the circle command, I attempted to put in an extra concatenation for the radius but i was left with one huge circle that still required me to click to confirm the radius, so I deleted that column and went with the usual and that is when it just pasted the columns. I'll attempt again in case it wasn't active when I thought it was to confirm.

 

I have attached the excel file, I moved the concatenation below the data, row 426.

 

Thank you in advance.

0 Likes
Message 4 of 7

Anonymous
Not applicable

Hi just to confirm, when pasting into command line it ends with 8 unknown commands and nothing on the drawing. Using circle command this time didn't paste the columns as previously so I must have not ensured the command line was active, however it still says 8 unknown commands and just has one large circle.

0 Likes
Message 5 of 7

steven-g
Mentor
Mentor
Accepted solution

Looking at your file you are concatenating the point number and the coordinates? But you are not telling AutoCAD what to do with the point number, using the coordinates would be fine to draw circles, see the attached file, if you copy the cells highlighted in yellow and paste this into AutoCAD's command line you get the circles, (the data does give two distinct clusters of points quite a distance from each other) 

Message 6 of 7

Anonymous
Not applicable

Hi Steve, thanks for your reply and investigation.

 

Yes I was doing the point ID and the co-ords, this seemed to be a solution on a similar topic but unfortunately it wasn't explained very well but it seemed to work for them. I had assumed that it therefore must just put the id in but now you mention it, not sure how it would have.

 

Unfortunately, no cells are highlighted in Yellow on the file I've downloaded, however I assume you mean the column where you have 'circle X,Y .5'? If so, that makes sense now I've seen it - thank you for showing me the logic for what I am attempting (rather than some topic's answers just being 'copy this formula =A1&B1.. etc').

 

Do you know of a way to import any data information such as the Point id, depth, date installed? I'm thinking maybe: text X,Y, point id?

0 Likes
Message 7 of 7

steven-g
Mentor
Mentor

Sorry yes, you found it, I saved the file and probably added the yellow after the save. You can create a long concatenation to draw a circle and insert a text item using the same point coordinates, but it is probably a lot easier just to create a second column that issues the text command on each row using those same coordinates, however, text and mtext are difficult in a script because where you would normally use a <space> to simulate the <enter> key in text a space is a valid input. Try this formula in column H (just pay attention to where there are spaces)

="-text j mc "&C427&","&E427&" 0.2 0 "&A427

 In AutoCAD, you have to paste in the two columns separately, first for the circles then again for the id labels. But this should give you the idea, then you can try and combine those two columns into just one long formula. Or change the text position or size to suit.

0 Likes