How to add vertex after the last vertex in polyline

How to add vertex after the last vertex in polyline

Anonymous
Not applicable
8,995 Views
9 Replies
Message 1 of 10

How to add vertex after the last vertex in polyline

Anonymous
Not applicable

Hi everyone,

Hope it is not repeating, but couldn't find answer to my question.

So I have to add vertex after the last one in a polyline. I am using pedit>edit>insert but it is not working consistently. It is working 50/50. Sometimes is working like I want, but sometimes is adding this new vertex between the last one and the prelast one. I tried to use or stop the snaps but its is not changing everything.

Using AutoCAD MEP 2008.

Could anyone explain me the logic behind the inserting vertex?

Thanks in advance.

0 Likes
Accepted solutions (1)
8,996 Views
9 Replies
Replies (9)
Message 2 of 10

ВeekeeCZ
Consultant
Consultant

Try PLContinue routine is what I'll take.

 

Just pick the end... and draw what you want. In case you don't know how to use a LISP, look HERE

 

Message 3 of 10

leeminardi
Mentor
Mentor

I don't know about 2008 but with 2018 you can add a vertex after the last vertex (assuming an open polyline) but not before the first vertex.  Make sure osnap is off then give the pedit command followed by e and then hit enter enough times for the last vertex to be selected at which point you can specify i (insert) and the location of the vertex.  To add a vertex before the first vertex you could use pedit followed by r for reverse then use the process outlined above.

lee.minardi
Message 4 of 10

Kent1Cooper
Consultant
Consultant

The one I use is PolylineContinue.lsp with its PLC command, available >>here<<.

 

As with @ВeekeeCZ's offering, it accepts selection of a Polyline, Line or Arc, and it draws a new Polyline from the nearer end of what you select, and connects them together afterwards.

 

BUT unlike that one:

A)  it determines the direction the selected one is headed at the end, in case you want to go into Arc mode and have a tangent continuation, just as you would if you were drawing the original at that point;

B)  if you use the Close option, it closes to the original's other end rather than the one you're adding, and connects them into a single closed result;

C)  it refuses selection of a closed original;

D)  it works if the original has global width [at least, @ВeekeeCZ's didn't Join new to original, in quickie testing];

E)  it accepts selection of "heavy" Polylines, even 3DPolylines  [which it redraws so that it can continue, since they can't be PEDIT/Joined];

F)  it works on things in different Coordinate Systems.

 

See comments, instructions, etc., at the top of the file.

Kent Cooper, AIA
0 Likes
Message 5 of 10

Anonymous
Not applicable

leeminardi - the method with the reverse seems ok but i dont have visualisation where is the first point of the line. And i dont have reverse options in peddit.

 

I have multiple situations (hundreds) where (pic 1) i have to conect lines to an object (pic 2).

 

Sorry but I am so newby and I can not make LISP working. I am successfuly loading it but after it I am not sure what should I do. I watched the tutorial that you attached but couldn't get it. 

0 Likes
Message 6 of 10

ВeekeeCZ
Consultant
Consultant
Accepted solution

The both routines work with same workflow. 

 

Load (or drag and drop) into drawing, type the command PLC, select the end to add the vertex.

 

See the SCREENCAST

Message 7 of 10

Anonymous
Not applicable

WOOOW, this is awsome. First of all this video seems like it is made in 2018. It is so complete so and dummies can make it.

Thank you for the video.

And the PLC works like a charm.

Thanks you guys, again.

Message 8 of 10

Anonymous
Not applicable

Hi, again,

I am using the recommended LISP file it is helping my a LOT. But dont know how i get an strange error message.

 

"; error: An error has occurred inside the *error* functionFunction cancelled"
"UCS "PLCTemp" already exists. Replace it? <N>"

 

Tried to type yes and no but without success.

I restarted autocad and the computer, again when i import the lisp and type plc, the error message stays. 

Google didn't helped me or I didn't asked correctly.

 

Someone has an idea how to get over this message?

 

0 Likes
Message 9 of 10

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... 

"; error: An error has occurred inside the *error* functionFunction cancelled"
"UCS "PLCTemp" already exists. Replace it? <N>"

.... 


That's a shortcoming in the command that I haven't yet gotten around to fixing, though it's been a while since I last worked on it.  It was written under a much earlier version in which some of the prompts in the UCS command were different, though I think the old option sequence still works even though the displayed options in the prompt have changed.  But I'm pretty sure that problem is the result of ending the PLC command with ESCape, which works as well as ending it with Enter in an ordinary PLINE command, but not [yet] in PLC.  This may be my motivation to get back into that and try to fix it, but in the meantime, try this:

(command-s "_.ucs" "_delete" "PLCtemp")

 

Or manually, UCS command; Delete option [which it accepts in 2016 that I have here, even though in recent versions that's not offered without first going into the NAmed option -- you can do that if you like]; type in PLCtemp.

 

Then you should be able to use the command again, and the problem should not recur if you are sure to always end it with Enter/Space or Close, not with ESCape.

 

I'll post an updated version when [if?] I get it worked out to allow ESCape as an ending.

Kent Cooper, AIA
Message 10 of 10

Anonymous
Not applicable

In AutoCAD 2008 which I am using the commands are > "_.ucs" "NAmed" "_delete" "PLCtemp".

The LISP is working properly again.

Thank you again for the fast reaction.

0 Likes