Jump to content

Recommended Posts

Posted

Does anyone have a lisp that can add multiple vertex for polyline?

I found this Lisp from the great @Lee Mac and it works except that I need to be able to pick simultaneously even if it does not reside on the line then hit escape or enter when done. I will then move the added vertex to its proper location.  

Posted

So is your question really how to make these loop, keep picking points until you hit enter or escape?

Posted (edited)

Since Lee's Code only has you picking a point its easy enough. Just add a call at the end of APV (line 95) to call itself again.  This will force a loop that you have to hit esc to exit.

 

- Edit

 

This is  a better option. Has undo marks.  You could also set your snaps before entering the command if you want to.

 

;;----------------------------------------------------------------------------;;
;; Add Polyline Vertex loop
;; Dependent AddLWPolylineVertexV1-1.lsp
(defun C:APVL ( / )
  (vl-load-com)
  (princ "\nStarting Add Polyline Vertex loop. Press ESC to stop.")
  (vla-StartUndoMark (setq doc (vla-get-ActiveDocument (vlax-get-Acad-Object))))  
  ;(setvar 'OSMODE 3) ;End and mid point snaps
  (while T
    (C:APV) 
  )
  (princ "\nAdd Polyline Vertex Loop ended.")
  (vla-EndUndoMark doc)
  (princ)
)

 

 

Edited by mhupp
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...