Hi,
I have created a simple lisp that will break a polyline based on the endpoints of a second polyline and place the broken part onto a separate layer.
The user is asked for the first polyline (existing ground) and then the second polyline (proposed ground). The polyline segment of the existing ground that is between the two endpoints of the proposed ground is placed on a separate layer.
These are cross sections. It can be that I have up to hundreds of cross sections in a drawing.
I want to modify the lisp so that I can select all the existing ground (on a single layer) and all the proposed ground (on its own layer) and somehow run the lisp on all existing ground polylines.
(defun C:Ground_Hidden()
(setq en1 (car(entsel "\n Select Existing
Ground: ")))
(setq en(car(entsel "\n Select Proposed Exisitng Ground:
")))
(setq enlist(entget en))
(setq ptList2 (list))
(setq
startPt(cdr(assoc 10 enlist)))
(setq endPt(cdr (assoc 10 (reverse
enlist))))
(command "_break" en1 StartPt "@")
(setq hidden (ssget
"_L"))
(command "_break" "_l" endPt "@")
(command "_chprop" hidden "" "LA"
"Ex_Ground_Hidden" "")
(princ)
)
Any help on this would be much appreciated.
thanks