AutoCAD – Drawings

The SPLINEDIT command in AutoCAD: close, reverse and join splines — and the precision of converting to a polyline

The SPLINEDIT command in AutoCAD (SPE) closes, reverses, joins and converts splines. Precision 1 gives 7 vertices, 1.3% off; 99 gives 283 vertices, 0.001% off.

  • TS. Đỗ Quốc Hoàng
  • 8 min read
Vertex count and length deviation when SPLINEDIT converts a spline to a polyline at three precisions Photo: Diagram by the Institute of Information Technology in Civil Engineering

Once drawn, a spline often needs work: closing into a loop, reversing to match another route, joining a straight piece, or converting to a polyline so other software can read it. The splinedit command in AutoCAD does all of that on an existing spline without redrawing.

This article tries SPLINEDIT in AutoCAD 2027 with the acadiso.dwt template, on a fit spline through the four points 0,0, 1000,800, 2000,-300, 3000,500, 4 198.052 long. Drawing splines is covered in the SPLINE command. For drafting taught properly, the Institute runs an AutoCAD course for construction.

Starting SPLINEDIT and its options

RouteWhere
Type SPLINEDIT or alias SPECommand line
RibbonHome → Modify → Edit Spline
MenuModify → Object → Spline

Locations and aliases come from the 2027 acad.cuix and acad.pgp files. Type SPE; AutoCAD asks Select spline: and then offers:

Enter an option [Close/Join/Fit data/Edit vertex/convert to Polyline/Reverse/Undo/eXit] <eXit>:

The Autodesk documentation on SPLINEDIT describes it as modifying spline parameters and converting spline-fit polylines to splines. This article covers the options used most: Close, Reverse, Join and convert to Polyline.

Close

Type C, then X to exit. The open spline becomes closed: its Closed property turns true.

LengthClosed
Before4 198.052No
After Close7 491.635Yes

The length grows by more than 3 290, well over the straight distance from 3000,500 back to 0,0 (about 3 041). So the closing piece is a curve, not a straight line joining the two ends. If you need the perimeter, read the length again after closing rather than adding by hand.

A closed spline can bound a hatch or be extruded into a solid; open shapes cannot. Extruding closed shapes is covered in the extrude command.

Reverse spline

Type R, then X. Start and end swap:

StartEnd
Before0,03000,500
After Reverse3000,5000,0

The shape stays the same; only the direction changes, with the same four fit points in reverse order. Nothing is added or removed: the first fit point is now 3000,500 and the last is 0,0, the same two points as before, read the other way round. That matters when the spline is a directed route: a road centreline, a pipe with a flow direction, or a path for extrusion.

Join spline and other curves

Draw a line continuing from the end 3000,500 to 4000,500. Type SPE, select the spline, J, select the line, Enter, then X:

ObjectsType
Before2Spline + Line
After Join1Spline

The line is absorbed into the spline, leaving one spline object. After J AutoCAD asks Select any open curves to join to source:, so the pieces joined must be open curves.

They must also touch. Move the line 200 away, starting at 3200,500, and Join again; AutoCAD says:

0 objects joined to source, 1 object discarded from the operation

Nothing is joined; there are still two objects. Snap the line's start onto the spline's end and it joins.

Convert spline to polyline: spline precision

Type P (convert to Polyline); AutoCAD asks Specify a precision <10>:. Three levels on the same spline, 1, 10 and 99, give the results below.

PrecisionPolyline verticesLengthDeviation from spline
174 142.255−1.329 %
10 (default)294 194.510−0.084 %
992834 198.028−0.001 %

Higher spline precision means more vertices and a closer fit. The default of 10 gives 29 vertices, under a tenth of a percent off, enough for most construction drawings. Precision 1 gives only 7 vertices, over 1 % off, too coarse for curves that matter.

Notice that every polyline in the table is shorter than the spline, never longer. That is geometry rather than chance: each polyline segment is a straight chord across a stretch of curve, and a chord is always shorter than the arc it cuts across. With 7 vertices the chords are long and the shortfall is 55.8 units; with 283 vertices they hug the curve and the shortfall shrinks to 0.024. A coarse conversion therefore always understates the length of the curve, never overstates it.

The three results also show where the returns diminish. Going from 1 to 10 cuts the error by a factor of about sixteen for four times as many vertices. Going from 10 to 99 cuts it by a further eighty times, but for nearly ten times the vertices. For most construction drawings, 10 is the sensible balance between file size and accuracy.

Two things to remember. First, the original spline is replaced by the polyline; copy it first if you want to keep the curve. Second, the number you type is remembered: after using 1 once, the next prompt shows <1> instead of <10>. Read the value in angle brackets before pressing Enter.

The SPLINE article uses PEDIT instead, which turned a four-point spline into 37 vertices through the SPLINESEGS variable. SPLINEDIT gives more direct control: the vertex count is set by one number inside the command.

Red: the spline converted at precision 1, 7 vertices, cutting the corners at each bend. Cyan: the same spline at precision 10, 29 vertices, following the curve closely Photo: AutoCAD 2027 screenshot

Spline-fit polylines become real splines

PEDIT with its Spline option smooths a polyline, but the object stays a polyline (2dPolyline). Select it in SPLINEDIT and exit at once with X, doing nothing else, and it is now a real Spline.

StepObject type
PLINE through four points, PEDIT → S2dPolyline
SPLINEDIT, select, XSpline

That matches the Autodesk documentation: selecting a spline-fit polyline in SPLINEDIT converts it even if you exit straight away. It is handy with older drawings, where curves were often smoothed polylines; converted to real splines, they can use Fit data and Edit vertex.

Preparing a curve for other software: a worked order

  1. If the curve is a smoothed polyline, select it in SPE and X to make it a real spline.
  2. If the outline is a spline plus some lines, J them into the spline. If the message says discarded, a piece does not touch; snap it into place.
  3. If the outline is open, C to close it, then read the perimeter again.
  4. If direction matters, check the start point and R if needed.
  5. Copy the curve to an archive layer, because the next step replaces it.
  6. P, precision 10 or more; 99 for curves that must be followed closely.
GoalPrecision to useResult in the example
Quick look, accuracy not needed17 vertices, 1.3 % off
Ordinary construction drawings1029 vertices, 0.084 % off
Cutting machines, survey work that must follow the curve99283 vertices, 0.001 % off

The perimeter and area of the resulting polyline can go straight into a spreadsheet; reading them is covered in calculating areas.

A last check is worth the few seconds it takes. Compare the polyline's length with the spline's length read before the conversion. At precision 10 the difference in the example was 3.5 units out of 4 198; if your difference is much larger, the precision was probably left at a low value from an earlier conversion, which is exactly the trap the remembered default sets.

Choosing the option for the job

JobOption
Close a curve into a loop for hatching or extrudingClose
Change the direction of a routeReverse
Add touching pieces to the end of a splineJoin
Send to software that cannot read splinesconvert to Polyline, precision 10 or more
Add, remove or move fit pointsFit data
Edit control pointsEdit vertex

Three things often repeated that are not true

Often repeatedWhat holds on the 2027 release
Converting to a polyline keeps the splineThe spline is replaced by the polyline
The precision always defaults to 10AutoCAD remembers the last value typed
Joining a line to a spline makes a polylineThe result is still one spline

Frequently asked questions

What does the splinedit command in AutoCAD do?

It edits an existing spline, alias SPE: close, reverse, join, edit points, convert to a polyline.

How do I convert a spline to a polyline and keep it smooth?

SPE, select the spline, P, type a high precision such as 99: 283 vertices, 0.001 % off. For ordinary drawings the default of 10, with 29 vertices and 0.084 % off, is usually enough and keeps the file lighter.

Why did the spline disappear after converting?

convert to Polyline replaces the spline with the polyline. Copy it first if you need to keep it.

How do I close an open spline?

SPE, select the spline, C, then X. The length grows because a closing curve is added: in the example, from 4 198.052 to 7 491.635.

Can I join a line to a spline?

Yes, with J, as long as the line touches the spline's end. With a 200 gap, AutoCAD reported 0 objects joined to source, 1 object discarded from the operation and joined nothing.

Why is the default precision no longer 10?

AutoCAD remembers the value from the last conversion. Type 10 again to return to it.

About the author

TS. Đỗ Quốc Hoàng — Vice Director of the Institute of Information Technology in Civil Engineering, Hanoi University of Civil Engineering, and a specialist in software development for construction