Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

program to insert blocks on polyline verticies

Status
Not open for further replies.

IFRs

Petroleum
Nov 22, 2002
4,658
I'm looking for an editable program LISP (preferably) or VB that will place a block at every vertex of selected polylines. Anything out there?
 
Replies continue below

Recommended for you

Thanks. I should have Googled before posting. I got this one:

; Insert the block Weld at each polyline vertex

(defun c:wb ()

(setq
plobj (car (entsel "\nSelect Polyline: "))
inc 0
)

(while (<= inc (vlax-curve-getEndParam plobj))
(command
"_.insert"
"weld"
(vlax-curve-getPointAtParam plobj inc)
"" "" ""
)

(setq inc (1+ inc))
)

)
 
That appears to do the job with a minimum of code.
You might want the code to disable then re-enable osnaps; in some cases/zoom levels the insert point might go to wrong location.
If a UCS is active, that too could caue errors.













 
Status
Not open for further replies.

Part and Inventory Search

Sponsor