Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Nov 22, 2002
Messages
4,680
Location
US
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?
 
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

Back
Top