PTIMPORT reads a text file of coordinates and builds geometry from it — survey points from a total station, setting-out data, a traverse, a profile, or anything else that arrives as columns of numbers.
What PointImport does
It will make POINT objects, a chain of lines, a polyline, a 3D polyline, a block at each coordinate, or a copy of anything you select.
Two column orders. XYZ is X, Y and optionally Z, in the natural order. PNEZD is point number, northing, easting, elevation, description — the standard survey exchange order.
With PNEZD the point number and description can be placed as text beside each point, which is what makes a survey drawing readable.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
PTIMPORTand choose the file. - Choose the column order carefully — see below.
- Choose what to build: points, lines, a polyline, a 3D polyline or blocks.
How it works
PNEZD is the one that catches people out, because northing comes first and it is the Y axis. A file read as XYZ when it is really PNEZD comes in transposed, and usually a long way from the origin as well, because the point number is being read as an X coordinate.
If your points land in the wrong place with north and east swapped, that is why.
Separators are worked out from the file. Commas, tabs, semicolons or runs of spaces — it looks at the first line with data on it. Blank lines and lines starting with ; or # are skipped, which matters because a trailing blank line is extremely common and is exactly the thing that stops a naive parser dead.
Geometry is built with entmake rather than by feeding every point into one command call. There is no command line length to overflow, and it is far quicker on a large file.
Notes and limits
- Get the column order right first. Everything else is recoverable; a transposed survey looks plausible and is not.
- Blank lines and comments are skipped, not treated as errors.
- Mixed separators are fine as long as the file is internally consistent.
- One undo group covers the whole import.
Download and details
| Name | PointImport — read a coordinate file and build geometry from it |
| Download | PointImport.lsp — 20.7 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | PTIMPORT |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 20.7 KB, 411 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer. |
| Author | YZ, August 2026 |
| Licence | Free to use, supplied “as is” with no warranty. |
References
- POINTBRIDGE LISP — moving point data in either direction, with attributes
- GRIDSURF LISP — importing a gridded CSV as a surface
- POLY3D LISP — lifting the imported polyline into 3D
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program