Isolate only Lines and Polyline object

Isolate only Lines and Polyline object

Cadguy86
Participant Participant
579 Views
5 Replies
Message 1 of 6

Isolate only Lines and Polyline object

Cadguy86
Participant
Participant

Hello Everyone,

I'm looking for a lisp routine that needs to be isolated only Line and Polyline objects, on my complex drawing.

I found a lisp on a page, it's working fine, but i want to isolate only Line and Polyline objects (Not by Layers)

 

https://www.cadtutor.net/forum/topic/30966-lisp-for-hidingshowing-objects/page/2/#comment-374578

 

(defun c:II (/ tab all ss i e)
;; temporarily isolate selected objects (regen will bring them back)
;; Alan J. Thompson
(setq tab (if (eq (getvar 'CVPORT) 1)
'(410 . "Model")
(cons 410 (getvar 'CTAB))
)
all (ssget "_A" (list tab))
)
(if (setq ss (ssget (list tab)))
(repeat (setq i (sslength all))
(redraw (setq e (ssname all (setq i (1- i))))
(if (ssmemb e ss)
1
2
)
)
)
)
(princ)
)

 

Thanks

0 Likes
Accepted solutions (1)
580 Views
5 Replies
Replies (5)
Message 2 of 6

ParishSouthBdx
Collaborator
Collaborator

Maybe im missing something but wouldnt  QUICKSELECT, for me found on the right side of the properties pallet, do the same.   it would do only lines and then only plines.  select the plines, then select all.  thus isolating the plines or lines 

0 Likes
Message 3 of 6

Kent1Cooper
Consultant
Consultant

If you're willing to use UNISOLATEOBJECTS [or the closing of the drawing] instead of REGEN to bring them back, how about just this? [untested]:

 

(defun C:ILP () ; = Isolate Lines & Polylines

  (command "_.isolateobjects" (ssget "_X" '((0 . "LINE,*POLYLINE"))) "")

)

Kent Cooper, AIA
0 Likes
Message 4 of 6

Cadguy86
Participant
Participant

Hi Kent,

This routine was worked fine. but the thing is my drawing file size is huge so it will takes time to isolate all lines.

Instead I need to isolate the Line and polylines only from Selected Objects.

 

Thanks.

0 Likes
Message 5 of 6

Kent1Cooper
Consultant
Consultant
Accepted solution

@Cadguy86 wrote:

.... I need to isolate the Line and polylines only from Selected Objects.

....


Remove the "_X".

Kent Cooper, AIA
0 Likes
Message 6 of 6

Cadguy86
Participant
Participant

Hello @Kent1Cooper , 

Thank you so much, It works fine.

0 Likes