Jump to content

Recommended Posts

Posted

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

Hidden_2.JPG

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...