Jump to content

Recommended Posts

Posted

MJML,

 

I believe it will still works.

 

Try it, or post a drawing with a typical pipe network that you need to process.

 

The proposal by Hippe013, you could get the same result by putting FSMODE to on and then issuing Command FS (Fastselect)

from the Express tool.

 

ymg

  • 3 months later...
  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • MJLM

    10

  • ymg3

    8

  • Hippe013

    2

  • pBe

    1

Top Posters In This Topic

Posted Images

Posted

After swiveling in my mind for quite some time, I managed to resolve the issue and came up with this code. It seems to do exactly what I wanted.

 

(setq hdls '())
(setq pl '())

(setq fln (entget (car (entsel))))

(setq hd (cdr (assoc 5 fln)))

(setq hdls (list hd))
(setq ss (ssget "X" '((0 . "LINE")))))
(setq h (sslength ss))

(setq j 0)
(repeat h 

	(setq pt10 (assoc 10 (entget (handent hd))))
	(setq pt11 (assoc 11 (entget (handent hd))))

	(setq s1 (ssget "X" (list (cons 0 "LINE") pt10)))
	(setq s2 (ssget "X" (list (cons 0 "LINE") (cons 11 (cdr pt10)))))
	(setq s3 (ssget "X" (list (cons 0 "LINE") pt11)))
	(setq s4 (ssget "X" (list (cons 0 "LINE") (cons 10 (cdr pt11)))))
	(setq s (acet-ss-union (list s1 s2 s3 s4)))
	(setq cnt (sslength s))

	(while (>= (setq cnt (1- cnt)) 0)
		(if (not (member (cdr (assoc 5 (entget (ssname s cnt)))) hdls))
			(setq hdls (append hdls (list (cdr (assoc 5 (entget (ssname s cnt)))))))
		)
	)

	(setq j (1+ j))
	(setq hd (nth j hdls))

)

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