Circles from excel to autocad

Circles from excel to autocad

Anonymous
Not applicable
15,171 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,172 Views
52 Replies
Replies (52)
Message 21 of 53

Anonymous
Not applicable
The CONCATENATE function and the & (and) operator perform the same operation in Excel. I however still tried it with the concatenate function just in case. Sometimes you never know with Excel. No difference. As soon as you add the Line Feed character (char(10)) to a String, this string becomes wrapped with quote when copied from Excel and the Line Feed doesn't even get captured in the copy it seems.

Both these formulas:
=CONCATENATE("dtext -",A1,",",B1," 2.3 0 ",B3,CHAR(10))
="dtext -" & A1 & "," & B1 & " 2.3 0 " & B3 & CHAR(10)
produce the same result in excel.
Both get wrapped in quotes without the Line Feed when copied in excel.
0 Likes
Message 22 of 53

dbroad
Mentor
Mentor

Post a partial excel file.  There are no double quotes when I paste to the command line.

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

Anonymous
Not applicable

Well found a partial answer to the issues here:

 

http://stackoverflow.com/questions/31886850/excel-newline-char10-copy-paste-issue

 

Must use char(10) AND char(13) to get a proper line feed when copying and pasting.

 

 

Here is an excel file that works when the pasting to notepad first to remove the quote for the dtext.

The circles can be pasted to Acad directly.

0 Likes
Message 24 of 53

Anonymous
Not applicable
BTW, with example file above, units must be set to architectural and inches.
0 Likes
Message 25 of 53

dbroad
Mentor
Mentor

Text, mtext, and dtext command have special implementation problems when copying from Excel to the AutoCAD command line.  There are two workarounds: 1) Wrap the command in lisp, and 2)Create a script.  The first is more difficult to conceptualize.  The second is more difficult to implement.  Examine the attached excel and watch the screencast.

 

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

Anonymous
Not applicable
Thanks for spending the time on this.
Wrapping in LISP solves it.
0 Likes
Message 27 of 53

ParishSouthBdx
Collaborator
Collaborator

I commend Broad on such thorough grasp of the subject matter.  To take on eleboration of the subject as with ".....one is more this and one is more that..." is evevident that one has wrapped his mind around something with great understanding and executions to fruition of ones goal.

Job well done.  The community is priveledged to have someone with such a wealth of knowledge to take the time and participate in these discussions.  ITo one, what may seem a simple gesture, to another it is as the path over a substantial hurdle leading to success in ones personal edevour within the capacity of their employment.  Bravo. 

0 Likes
Message 28 of 53

steven-g
Mentor
Mentor

For those who are LISP illiterate and LT users, this works for me, the ASCII character 8 causes a backspace which removes the text quotes

formula.JPG

0 Likes
Message 29 of 53

Anonymous
Not applicable
Cant see the end of your formula but I assume you added a char(8) at the end to remove the final quote?
0 Likes
Message 30 of 53

steven-g
Mentor
Mentor

What you see, works, it removes the opening quotes which works here, though I did try it on another machine and it left the last text command open which I had to finish manually with the ESC key, but for all the other lines that single CHAR(8) is fine. But there may well be system differences that play a role.

0 Likes
Message 31 of 53

dbroad
Mentor
Mentor

@ParishSouthBdx Thanks for the praise.

@steven-g  Nice workaround

@Anonymous Fred, I don't know why this didn't work last night but am attaching a "-text" method that works.  You don't need the return keyins and backspace characters if you don't need more than one line of text per command.  See attached spreadsheet, which works here.

 

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

Anonymous
Not applicable

Sir,

 

I have done a script in excel to insert blocks by co-ordinates. Its working, But that particular Auto CAD file should contain those blocks initially, and I need to select the block 1 by 1. That means my script can use only for automating insert comment, angle, x and y coordinates.

 

But Sir, Is there any possibility in script writing,which that I can use for automating the selection of block also ( I mean If I give the path of block file Auto CAD do the remaining.. something like that)

 

If you send a sample file that will worth a lot for me..

 

Thank you

 

 

Now I am using the script that shown below..

 

="insert "&"rotate"&" "&D34&" "&E34&","&F34&" "

="insert "&"rotate"&" "&D35&" "&E35&","&F35&" "

 

D34 - Angle

 

E34 - x coordinate

 

F34 - y coordinate

0 Likes
Message 33 of 53

TerryDotson
Mentor
Mentor

For those that would rather simply select the range of data to create a DXF ready to insert into AutoCAD, take a look at ExcelDraw from Gray Technical.  You can basically build a drawing of various object types direct from Excel data.  All drawing rules live in the XLS so you can change cell data at any time and reprocess the drawing.

0 Likes
Message 34 of 53

Anonymous
Not applicable
See the attached spread sheet.
You can add as many lines as you need blocks to be inserted.
Fill in your block names and X,Y,ROTATION data.
Right now, it scale factor and number of lines and column are hard coded to 1 but you can change that if you want.

It uses the MINSERT command rather than the INSERT command.
The MINSERT does not call up a popup window (not on my very old version of AUTOCAD anyway...) and all parameters are prompted for on the command line.
That's the secret to this method working.

Once you have filled in your spread sheet and made sure your blocks exist in your AutoCAD drawing do the following:


1) Copy and paste column 1 (without the header) into an text editor (Notepad for example).

2) Notepad, will add some double quotes ( " ). They must be removed. Use Notepad's find-and-replace function to do this quickly.
Note pad will also have generated the proper line feed and carriage returns.

3) Copy-paste the complete text onto the command line in AutoCAD.

Should work.
Message 35 of 53

Anonymous
Not applicable
Seems like my file didnt attach to this post. Here it is.
Message 36 of 53

Anonymous
Not applicable

Thank you very much for your reply.. Now I'm using MINSERT instead of INSERT and its working..

 

Thank you boss

 

 

0 Likes
Message 37 of 53

Anonymous
Not applicable

Now I'm using this format..

 

="minsert " & D34 & CHAR(13)&CHAR(10) &"rotate " &E34&" "&F34&","&G34&" 1 1 1 1"

 

But while editing in note pad, Its having some space after " 1 1 1 1" and I need to edit that also.. 😞

Is there any problem in my format

 

Here I'm using formula in cell D34 to find my block, for example It will find the block name, angle, x y coordinates and display in D34, E34, F34 and G34 respectively based on the code that i give in the cell C34

 

While using the file that you attached, Its not having that problem. Only that I need to remove all "s.. 

 

What are the possible errors??

 

 I attached my excel file Here

0 Likes
Message 38 of 53

Anonymous
Not applicable

Thanks a lot, this solution is very useful for me.

But Can the centre symbol not show on the drawing? or can seperate the centre symbol and the circle?

Clipboard01.png


@Anonymous wrote:

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


 

0 Likes
Message 39 of 53

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... Can the centre symbol not show on the drawing? or can seperate the centre symbol and the circle?


....

 

Those are spheres, not Circles, and the "center symbol" is the isolines that make the shape of the sphere "readable" in views from other-than-orthogonal directions.  If you really want Circles  [which will not have the isolines], go back to the first accepted Solution, before the idea of spheres came into the thread.

Kent Cooper, AIA
0 Likes
Message 40 of 53

Anonymous
Not applicable

Problem solved.


@Kent1Cooper wrote:

@Anonymous wrote:

.... Can the centre symbol not show on the drawing? or can seperate the centre symbol and the circle?


....

 

Those are spheres, not Circles, and the "center symbol" is the isolines that make the shape of the sphere "readable" in views from other-than-orthogonal directions.  If you really want Circles  [which will not have the isolines], go back to the first accepted Solution, before the idea of spheres came into the thread.



Thanks for your help.

0 Likes