Last updated July 27, 2026
ImportXYZ is a free AutoLISP routine by Jeffery P Sanders that reads X,Y,Z coordinates from an external file and places something useful at every point in the current drawing. It accepts Excel spreadsheets (.xls), CSV files and just about any delimited text file, which makes it a practical bridge between a coordinate listing and an AutoCAD drawing.
It is the sort of tool you reach for when someone hands you a survey pick-up, a setout schedule or a borehole listing and the alternative is typing every coordinate in by hand. Load the file, choose what you want drawn at each point, and the routine does the rest.
What it does in practice
Everything runs from a single dialog box. You pick the data file, preview the coordinates it found (the list shows the first 50 results only), then choose one of six outputs via radio buttons:
- Draw a Node — a point entity at every coordinate.
- Draw a Circle — a circle of the diameter you set (default 0.1) on every point.
- Draw Lines — lines from point to point through the whole list.
- Insert a Block — your nominated block inserted at every point.
- Edit Attribute — inserts the block and writes the coordinates into its attributes; you tell it which attribute tags hold X, Y and Z.
- Insert Excel Note — places the note text carried with each point, survey point numbers for example, using a leader.
You can also pick the target layer from a Layer Name list in the same dialog. The routine switches off object snaps while it works and restores your previous osnap and current-layer settings when it finishes, with a progress bar and command-line messages to track longer files.

Command reference
Loading the file defines a single command:
- IMPORTXYZ — opens the ImportXYZ dialog box and runs the whole import from there.
How to load it
Unzip the download and keep both files together — IMPORTXYZ.LSP and IMPORTXYZ.DCL — in a folder that is on AutoCAD’s support file search path. The routine loads its dialog definition from IMPORTXYZ.DCL at run time and stops with “The IMPORTXYZ.dcl file could not be found.” if AutoCAD cannot see it.
Then load the LSP file with APPLOAD (Tools, Load Application), or add it to the Startup Suite in the same dialog if you want it available in every session. If you are new to loading and running LISP files, the AutoLISP guide covers the basics.
Step-by-step usage
- Type IMPORTXYZ at the command line. The dialog opens.
- Click “Browse for File” and pick your data file in the “Select File to Import From” dialog, then set “Decimal Places to Display”.
- Click “Get XYZ Coords”. For an .xls file the routine opens Excel in the background and asks which worksheet to read via a “Select EXCEL Sheet Name” dialog. For text files it tests the first line for space, comma or tab delimiters, in both 2D and 3D layouts.
- If no delimiter matches, a “Select File Type” dialog asks how the file is arranged: one value per line (X then Y), X, Y and Z on successive lines, or fixed-width columns where you enter the “Number of Characters” per coordinate.
- Check the preview list, choose an output option and layer, fill in the diameter, block name or attribute tags if your option needs them, and click Okay.
- The command line reports progress (“Placing nodes…”, “Inserting block # …”) and finishes with “IMPORTXYZ.lsp Complete.”
If you are curious how a routine like this reads a file line by line, AutoLISP lesson 10 on input and output walks through the same file-handling functions it uses.
Compatibility notes
ImportXYZ was written in 2005 and last revised in March 2006 (that update fixed a problem with blank Excel lines). The listing records it working on AutoCAD 2007. AutoLISP has shipped with every full version of AutoCAD for decades, so a routine written for that era will generally still load today, the listing only records AutoCAD 2007, so try it on a copy of a drawing in your own release first.
Because it is dialog-driven, it needs full AutoCAD. AutoCAD LT gained AutoLISP support in LT 2024, but LT does not support the DCL dialog boxes this routine depends on — see what runs on AutoCAD LT for the details.
Two Excel-specific points. The spreadsheet option drives Excel through its object library, so Excel must be installed on the same machine — the routine alerts you if it cannot start Excel. And it only recognises the older .xls format by extension; a modern .xlsx workbook is best saved as .xls or CSV first.
Download
| Name: | ImportXYZ |
| Description: | ImportXYZ is a no fuss, groovy little, AutoCAD LISP routine, for importing coordinates (X,Y,Z, locations) from practically any type of file. For example excel (.xls), CSV, and any delimited ascii file are all accepted. With ImportXYZ you can import a list of X,Y,Z points into an AutoCAD drawing and display any of the options listed below at the specified coordinates * Draw a node on every point. * Draw a circle to set size on every point. * Draw lines from point to point to point. * Insert a block on every point. * Insert a block and update the X, Y, Z attributes on every point. * Add a note on every point, Example: survey point numbers. |
| Type: | AutoCAD AutoLISP Routine |
| Author: | Jeffery P Sanders |
| File Size: | N/A |
| Cost: | Free |
| Worked on: | AutoCAD 2007 |
| Download File: | IMPORTXYZ.zip |
Related routines
- COGO bearing and distance label LISP — label survey lines with bearings and distances once your points are in.
- Distance and bearing angle LISP routine — report distance and bearing between picked points.
- Zero elevation LISP routine — flatten imported geometry back to Z=0 when you only wanted the plan position.
More free tools are catalogued in the free LISP routine library.