Editing Polylines in AutoCAD – PEDIT

On our past tutorial, we created polylines. Now we are going to edit them. The command used is PEDIT.  Which means polyline edit and the subcommands are [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Undo]:. Now lets start.


The “Close” in PEDIT command is similar to creating polylines like we did in our previous tutorial. First create an open polygon, in our example I created a four sided polygon. Type “PL” on the keyboard and create three sided open polygon as shown on Fig.1. Then type PEDIT on the command prompt and press enter. It wll promt you with Select polyline: which is asking you to select the object you wish to edit. Then point the cursor, also called the “selection box” on the polygon and click. Afterwards AutoCAD will prompt Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Undo]:Type “C” and press enter. You wll notice that a line was created to enclose the polygon ( See Fig. 2).

    autocad polyline icon

Fig. 1 – Draw An Open Polygon Using Pline Command

    autocad polyline icon

Fig. 2 – Using Pedit to Enclose a Polygon


The purpose of the Join sub command is to join segments of lines, arcs or polylines. To make a sample, just create a series of connected lines or arcs (not polylines). Then type “PEDIT’ on the command prompt and it will prompt you: Select polyline: then select the lines you have created. Then AutoCAD will prompmt you again: Object selected is not a polyline Do you want to turn it into one?<Y> just type “Y” which means yes. Then it will prompt you again: Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Undo]: Type “J” to invoke the join command and press enter on the keyboard. Again it will prompt: Select objects: select the lines you created, I mean all the lines, one by one. You can also type “all” on the command prompt since there are no other objects affected, only the lines you have drawn then press enter two times to end the command loop.


The width subcommand is for editing the thickness of the polyline. First draw series of connected polylines. Then type “PEDIT” and select the polyline then after the prompt Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Undo]: type “W” and it will prompt you again: Specify new width for all segments: meaning you have to indicate the new thickness of the line. Type 0.4 for now and press enter. You will see that a new thickness of the line was created.

    autocad polyline icon

Fig. 3 – Using Pedit to Change Polyline Thickness

Edit vertex

Vertex are endpoints of the series of lines (See Fig. 4). Here you can change the vertex position. To start, type “PEDIT” again and press enter. Select the polyline and after the prompt  Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Undo]:appears type “E” to invoke the Edit Vertex command and press enter. You will notice a an “X” mark will appear on the first vertex. Then a prompt will appear: Enter a vertex editing option [Next/Previous/Break/Insert/Move/Regen/Straighten/Tangent/Width/eXit] <N>: Type “N” to move the “X” mark then type “M” to move the vertex on its new position. When you typed “M”, AutoCAD will prompt: Specify new location for marked vertex: you will see a line dragging behind a moving “X” mark for you to specify a new location. Click your mouse to you desired place on the screen. Then type “X” to exit and press enter to terminate the command loop.

    autocad polyline icon

Fig. 4 – Vertex of a Polyline


Creates a smooth curve consisting of pairs of arcs joining each pair of vertices. The curve passes through all vertices of the polyline and uses any tangent direction you specify (See Fig. 5). The method is simple, just follow the example we did above.

    autocad polyline icon

Fig. 5 – Curve Was Created After The Polyline


This command coverts a polylines into a smooth set of curves. Make a series of polylines as shown in Fig.6. Then after that type “PEDIT” and press enter. Then select the polyline with your selection box and click. AutoCAD will prompt asking you to enter the option: Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype gen/Undo]: type “S” to invoke the spline command and press enter. Suddenly the polyline will turn into a smooth curves.

    autocad polyline icon

Fig. 6 – Using the Spline Polyline Will Have Smooth Curves


This command is very simple and need not elaborate. This is the same thing as Undo command on other application. In fact you can also use the undo command.

Ltype gen

This is a command to edit a linetype where you can specify whether a linetype pattern is centered on each segment or continuous throughout the entire length of a 2D polyline. The command is like a switch which turns it off or on. Again to illustrate, create a zigzag polyline as we did above. Depending on how you set your linetype scale, if your drawing is too small or too big for the given linetype scale, you will not see the linetype if the setting is not correct. So have to adjust the linetype scale first. Type “ltscale” and change the value to 0.1 then press enter.

I assumed you already know how to change the linetype of the objects like for exampe, the polyline. Change it first to DASHED then type PEDIT and press enter. Select the polyline and click your mouse left button. When the Enter an Option prompt appears, type  “L” to invoke the command Ltype gen. Then AutoCAD will prompt: Enter polyline linetype generation option [ON/OFF] <Off>: which is asking you whether you want to turn it ON or OFF. Turning it OFF will make the linetype pattern centered on each segment. Turning it ON will make it continuous throughout the entire length of a 2D polyline (See Fig. 7).

    autocad polyline icon

Fig. 7 – Turning Line type Generation ON or OFF


I guess this is a no brainer, it is as simple as undoing the actions you have done.


#1 Larry Huffman on 02.16.10 at 12:11 pm

This is 2010 and I am using Autocad LT 2005 so I’ve been looking for an answer to this question for 5 years.

I draw a polyline. I select Edit Polyline from the toolbar, choose spline, then choose Ltype gen….. ON. I change the polyline to a dashed line. I now have a dashed line (Ltscale is 0.25.) I draw a line perpendicular to the poly line to use as a trim line. When I trim the polyline, it reverts back to a continuous line (with some dashes). Once again, I have to select Edit Polyline from the toolbar, choose LT type gen….. ON… again in order to get the dashed line back.

There must be a system variable somewhere.

#2 Lito on 02.17.10 at 2:55 pm

@Larry Huffman
Maybe it is a bug. In my opinion there is no such thing as a perfect software.

#3 Bandit on 11.11.10 at 5:36 am

plinegen = 1

#4 rajkumar on 05.23.11 at 12:59 pm

while doin solid edit suddenly hanging

#5 TruXter on 11.15.11 at 10:51 pm

I am kinda self taught in cad So some things that are basic to most, I don’t have yet, while other things are almost second nature.
My co-workers have all taken some course here or there. They all use osnap and that drives me nuts. Having the mouse stop all over the place like my computer is lagging.
So the pedit/close sure solves a lot of the issues I face while talking to these weirdos.
Thanks for this post. I have no idea how I will find my way back to reference this page when I need the info.
but again. Great job.

Leave a Comment