When adding a vertexto the end of a polyline using the grip edit, thereis a 50% chance the vertex will be outside the new polyline or inside it. I wanted to know if there was a transparent command that I could hotkey to swap from inside to outside or (vice versa) like you can do by cycling options with the ctrl key. As it stands right now, if I grip edit and try to add it but it's on the wrong side, I have to escape out of the command and run the reverse polyline command then go back and restart grip editing.
If there isn't a command already, could someone please make a list that would perform the same function?
Thanks!
The vertex is added within when at the first vertex grip. It is added beyond when at the last vertex grip. In the case where it does not do what you want, hit escape, then right click the polyline and choose Polyline -> Reverse and then add the vertex beyond (or within) as you wish.
I am not aware of a program that could do that while in the grip edit mode.
Wow, did the work and didn't realize this was from 2014. Anyways, where there's a will there's a way. Here's something I just put together in .lsp:
(defun c:RAV ( / ssLine ptList ptLast) ;Reverse & Add Vertex (if (= (getvar "CMDNAMES") "GRIP_STRETCH") (progn (command) (setq ssLine (ssget "_I") ssEnt (ssname ssLine 0)) (command "_.REVERSE" ssEnt "") (setq ptList (vl-remove nil (mapcar '(lambda (x) (if (= (car x) 10) (cdr x))) (entget ssEnt)))) (setq ptLast (nth (- (length ptList) 1) ptList)) (command "_.PEDIT" ssEnt "E") (repeat (length ptList) (command "N")) (command "I" pause "X" "") );progn );if (princ);finish quietly );defun
...you will need to create your own Keyboard Shortcut in your CUI...
...I used "CTRL+F", so while I was editing the grip I could press "CTRL+F" to execute the command.
...I'm not real savvy on making gifs, so here's an image right Before using CTRL+F and right After using CTRL+F...
^^^Before
^^^After
...of course you would need to add the RAV lisp to your startup acaddoc.lsp file if you did not want to load it every time.
Best,
~DD
Alternatively,
This updated version of RAV would allow the user to add more than one vertex to the line until user: escapes, presses space, right-clicks, hits enter...
(defun c:RAV ( / ssLine ptList ptLast ptOld ptNew) ;Reverse & Add Vertex (if (= (getvar "CMDNAMES") "GRIP_STRETCH") (progn (command) (setq ssLine (ssget "_I") ssEnt (ssname ssLine 0)) (command "_.REVERSE" ssEnt "") (setq ptList (vl-remove nil (mapcar '(lambda (x) (if (= (car x) 10) (cdr x))) (entget ssEnt)))) (setq ptLast (nth (- (length ptList) 1) ptList)) (command "_.PEDIT" ssEnt "E") (repeat (length ptList) (command "N")) (command "I" pause) (setq ptOld 1 ptNew 2) (while (not (equal ptOld ptNew 0.000001)) (setq ptOld (getvar 'LASTPOINT)) (command "I" pause) (setq ptNew (getvar 'LASTPOINT)) );while (command "X" "") );progn );if (princ);finish quietly );defun
Best,
~DD