How to Transfer Data Points from Excel File to AutoCAD

How to Transfer Data Points from Excel File to AutoCAD

Anonymous
Not applicable
31,627 Views
8 Replies
Message 1 of 9

How to Transfer Data Points from Excel File to AutoCAD

Anonymous
Not applicable

Hi there,

 

I have a data set with the coordinates (northing, easting) of gauges on a construction site that I would like to plot on an AutoCAD drawing of the site. Is there an easy way to do this using Excel and AutoCAD only? 

 

Any help would be greatly appreciated.

 

Thanks!

0 Likes
Accepted solutions (2)
31,628 Views
8 Replies
Replies (8)
Message 2 of 9

jabowabo
Mentor
Mentor
Accepted solution

You can modify your Excel file into a .scr file as detailed here:

https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-i...

 

Lots of other ways but this one is pretty simple and straightforward.

 

Ex. script text shown in link:

_MULTIPLE _POINT
9231.55,8799.44,10
9241.83,8781.49,20
9194.23,8765.63,20
9191.68,8751.05,30
9158.88,8725.80,50
9147.11,8726.84,80
9128.10,8712.21,40
9145.18,8690.02,10
9152.41,8689.65,0
9167.86,8585.40,0
Message 3 of 9

leeminardi
Mentor
Mentor
Accepted solution

Your goal with Excel is to create a column of coordinates that are of the format number-comma-number (e.g., 1.23,4.56) and then use that column of coordinates in response to an AutoCAD command.  This can be done by creating a script file (.scr) or by simply doing a copy-paste of the coordinate list from Excel to AutoCAD.

 

If you wanted to generate a single polyline base on the coordinates you would select the coordinate in Excel, use Ctrl-C to copy them to the clipboard and then in AutoCAD give the command pline and then do a paste (Ctrl-V).

 

I like to use the Excel concatenate function to format the coordinates.  As you can see below it takes the value from column A then adds a comma (",") then the value from column B.

image.png

In this example you would Ctrl-C the values in column D and then in AutoCAD give the pline command followed by Ctrl-V (paste).

 

If you want to add a series of points then you need to terminate each coordinate with a space character.  The contents in B3 would look like this:

=CONCATENATE(A3,",",B3," ")

note the " " at the end.  This adds a space at the end of each line.

image.png

Again, Ctrl-C the values in column D  but in AutoCAD give the point command and then Ctrl-V paste.

 

 

lee.minardi
Message 4 of 9

Anonymous
Not applicable

That worked! Thanks!

0 Likes
Message 5 of 9

Russell_I
Explorer
Explorer

You can also add the AutoCAD command into the Excel formula in D3:

=CONCAT("point ",A3,",",B3," ") or

=CONCAT("pline ",A3,",",B3)

Note the space after the AutoCAD command.

Message 6 of 9

criveQ4B2V
Community Visitor
Community Visitor

This is very helpful, however, how can you use this tool and command to also include the point ID's so that you can tell what each point is once it is imported into AutoCAD?

0 Likes
Message 7 of 9

leeminardi
Mentor
Mentor

@criveQ4B2V wrote:

... how can you use this tool and command to also include the point ID's so that you can tell what each point is once it is imported into AutoCAD?


Try the following:

  1. Create a block with an attribute that will be used as the point number. For example,
    leeminardi_0-1731075017724.png

     

  2. Set ATTDIA to 0.  This will disable  the dialog box for attribute value entry.
  3. Add a column to you Excel file for the AutoCAD command like the following:
    leeminardi_1-1731075224403.png

    Note that cell I2 contains the following (fill it down to other rows):

 

 

=CONCATENATE("(command ",CHAR(34),"-insert",CHAR(34)," ",CHAR(34),A2,CHAR(34)," ", CHAR(34),B2,",",C2,",",D2,CHAR(34)," ",E2," ",F2," ",G2," ",H2,")")

 

 

CHAR(34) in the formula above is used to create quote marks needed by the LISP statement that are not confused with quote marks that are reqired by Excel.  

      4. Copy to the clipboard cell I2 down to the last row.

      5. Paste to the command prompt in AutoCAD yielding:

leeminardi_2-1731075596762.png

 




lee.minardi
Message 8 of 9

ssise
Community Visitor
Community Visitor

I tried option 2, but it doesn't on my system.

0 Likes
Message 9 of 9

leeminardi
Mentor
Mentor

post your Excel file and a drawing file that contains the blocks.

lee.minardi
0 Likes