Circles from excel to autocad

Circles from excel to autocad

Anonymous
Not applicable
15,856 Views
52 Replies
Message 1 of 53

Circles from excel to autocad

Anonymous
Not applicable

I have many x,y and radius values on excel file however I can't export them to autocad.

 

Is there any shortcut to do all in once?

 

Thank you 

0 Likes
Accepted solutions (2)
15,857 Views
52 Replies
Replies (52)
Message 2 of 53

ParishSouthBdx
Collaborator
Collaborator
  1. In Microsoft Excel, open the workbook or spreadsheet that you want to access from the AutoCAD-based product.
    2. Select a range of cells to function as a database table.
    3. Enter a name for the range of cells in the Name Box, then press Enter.
    Repeat steps 2 and 3, if desired, to specify additional database tables.
    Click File  Save.

 

or insert table in autocad, when the form pops up, pick under inssert options FROM A DATA LINK, browse to your spreadsheet.

0 Likes
Message 3 of 53

Anonymous
Not applicable

but I need to create circles with these numbers in autocad. It's not only exporting excel sheet into Autocad.

0 Likes
Message 4 of 53

beyoungjr
Advisor
Advisor
Okay, it's a bit of a challenge but here's my old fashioned way...

Copy the data to a text editor or MS Word as plain text. Every line of data should end up as the x,y value and radius value.
If every line effectively has an "enter" (return) at the end then you are in business. If the radius is on the line after it's x,y value then even better.

Here's an example of how I have used line and/or circle commands to automate object creation...
L (return)
2,2 (return)
4,4 (return)
(return)
C (return)
2,2 (return)
.25 (return)
(return)
C (return)
6,6 (return)
.25 (return)
(return)

You should have a 2" line on a 45 degree angle with 2 1/2" diameter circles on either end.
If you understand the command shortcuts the you can use MS word to insert a "C" on each line before the x,y value and place an empty return between the end of one circle creation and beginning of the next.

Hope it's not too confusing? A very long text sequence will step through many processes at once, especially simple tasks like circle creations.

 


Blaine Young
Senior Engineering Technician, US Army

0 Likes
Message 5 of 53

dbroad
Mentor
Mentor
Accepted solution

1) In your spreadsheet, insert a column to the left of A.

2) Assuming you don't delete your header row (1), put this formula in cell A2

=CONCATENATE("circle ",B2,",",C2," ",D2)

3)Copy that formula down to the end of the circle data.

4)Select the range A2:A26 and choose copy.

5)Paste into the AutoCAD command line.

 

 

 

Architect, Registered NC, VA, SC, & GA.
Message 6 of 53

Anonymous
Not applicable
Thank you very much for the reply but are you sure that the formula is correct? It seems like not working -- *Anil Baysal* *Graduate Research AssistantMining Engineering and Management DepartmentSouth Dakota School of Mines and Technology, USA*
0 Likes
Message 7 of 53

Anonymous
Not applicable

Now, it worked. Thank you very much!

0 Likes
Message 8 of 53

Anonymous
Not applicable

Dr dbroad, does it work in the same way if I want to create spheres in 3D? Because, it seems like autocad doesn't ask for Z coordinates to draw a sphere. I obtained x,y,z coordinates and r for 3D sphere locations but it doesn't work.

0 Likes
Message 9 of 53

dbroad
Mentor
Mentor

Not a Dr.  Just an architectural professor.

 

The fifth argument  to the concatenate function (the comma) should not have a space.  Coordinates must not be separated by spaces.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 10 of 53

Anonymous
Not applicable

If you mean like this, it did not work either            =CONCATENATE("sphere ",B2,",",C2,", ",D2,"",E2)

 

 

0 Likes
Message 11 of 53

dbroad
Mentor
Mentor

=CONCATENATE("sphere ",B2,",",C2,",<no space here>",D2,"<one space here>",E2)

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 12 of 53

Anonymous
Not applicable

Sir, are you sure that this code is successful for AutoCad2015?  because I keep getting error when I use this =CONCATENATE("sphere ",B2,",",C2,",",D2,"",E2)

 

 

 

 

autocad2015error.PNG

Message 13 of 53

dbroad
Mentor
Mentor
Accepted solution

=CONCATENATE("sphere ",B2,",",C2,",",D2," ",E2)

 

You didn't follow instructions.  Remember<no space here> <one space here>?  You took out both spaces.

Architect, Registered NC, VA, SC, & GA.
Message 14 of 53

Anonymous
Not applicable

This tip is great.  Never knew you could cut and paste multiple line into the commad line.

Used this to autocreate dwgs of some parametric designed spreadsheet parts.

 

However, how can I get it to work with the TEXT command which requires two Return characters after the text entry in order to return to the command prompt?

 

If I paste the following into the command line:

 

text 0,0 24 0 N22

text 10,10 24 0 N11

 

I get the following onscreen result:

 

Capture.JPG

 

 

 

The second command is taken as a second line of text rather then a command.

 

regards,

 

FB

0 Likes
Message 15 of 53

Kent1Cooper
Consultant
Consultant

@fredla wrote:

... how can I get it to work with the TEXT command which requires two Return characters after the text entry in order to return to the command prompt?

 

If I paste the following into the command line:

 

text 0,0 24 0 N22

text 10,10 24 0 N11

.... 

The second command is taken as a second line of text rather then a command.

 

....

Can you structure the Excel file so that it provides the extra Return between lines?

 

text 0,0 24 0 N22

 

text 10,10 24 0 N11

 

Kent Cooper, AIA
0 Likes
Message 16 of 53

dbroad
Mentor
Mentor

I agree with Kent.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 17 of 53

Anonymous
Not applicable

Yeah, ive been messing with this for a few hours now and I came up with that solution of inserting a blank line between each line in my spreadsheet.

Works but is kind of annoying because my spreadsheet is a list of many lines (labelled circles of various sizes and positions) that get sorted and filtered by the users.

Those blank lines disappear with every sort and must be reinserted if im to paste to Acad. 

Will have to write a little VBA to insert those lines as there are a few hundreds of them...

 

Tried adding the line feed (char(10)) or carridge return (char(13)) to the excel formula but a weird thing happens when I copy and paste into the command line:  for some reason, a double quote (") appears at the begining of each command.

 

So the formula is:

="dtext -" & A2 & "," & B2 & " 2.3 0 " & A1 & CHAR(10)

 

The text that appears in the cell is:

dtext -160,3' 2.3 0 M-1A

 (with a line feed character which shows up as a multi line cell in excel)

 

and this is the result of the paste into Acad:

 

Capture.JPG

 

Notice that quote before dtext... 

Anyideas on how to prevent that?

 

thanks,

 

Fred

 

0 Likes
Message 19 of 53

dbroad
Mentor
Mentor

Fred,

You didn't follow the discussion above.  If you are combining different excel cell values into a single cell, you must use the concatenate function.

 

=concatenate("dtext ", ......)

 

The results cannot have double quotes in them.  AutoCAD doesn't understand double quotes.

 

Why are you sorting in Excel? There shouldn't be a need for sorting.  However, if you must, you can add a column to your sort to prevent losing the spaces.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 20 of 53

Anonymous
Not applicable
Helps.
Still need to insert the blank lines in notepad as for some reason they dont seen to get picked up by the copy in excel and hence dont paste into Acad..
But easier to insert those lines there rather than in excel.
Then Search and replace to remove a few hundred quote in notepad.

Still open to other solutions.
0 Likes