Jump to content

is it possible to draw point in an intersection between lines of 2 designated layers?


aridzv

Recommended Posts

Hi.

I have found this lisp INTLINES that draw a point in every intersection of a selected objects.

 

lets say I have 3 layers - L1,L2,L3.

I'm looking for help to add to this lisp the possibilty to choose to draw the points only in intersection between objects that belong to layers L1 and L3

(see attached screenshot that illustrate the problem and a sample drawing).

 

thanks,

Ari.

 

Capture.PNG

new block.dwg

cdnc5-02.lsp

Edited by aridzv
Link to comment
Share on other sites

  • aridzv changed the title to is it possible to draw point in an intersection between lines of 2 designated layers?
;;  (setq SS1 (ssget);(ssget "_X");(get_all_lines_as_SS)
	(setq SS1 (ssget '((-4 . "<OR") (8 . "L1") (8 . "L2")(-4 . "OR>")))
	PTS (get_all_inters_in_ss SS1)
        )

On line 118 of the program, with the function "ssget", use the logical operator "OR" to restrict the selection to layers "L1" or "L2".

 

  • Thanks 1
Link to comment
Share on other sites

11 minutes ago, Tharwat said:

@lido FYI in this case you can just concatenate the layer names with comma, like: (8 . "L1,L2") without the use of 'OR" logic operator. 

@Tharwat Of course, your solution is simpler and more direct.

  • Agree 1
Link to comment
Share on other sites

Hi.

here is the final updated lisp.

There are 2 changes from the original lisp:

1. the 2 layers are not hard-codded in the lisp,but the lisp prompt the user to select them.

2. the points are drawn on the second layer (submain layer) regardles of the drawing current layer.

 

thanks again for all the help,

Ari.

 

INTLINES_UPDATE.lsp

Edited by aridzv
Link to comment
Share on other sites

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