Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ssget filter question

1,175 views
Skip to first unread message

James Chung

unread,
Mar 13, 2002, 9:51:29 PM3/13/02
to
Hi everyone.

I want to select 3dpolyline and tried (ssget '((0 . "POLYLINE") (100 .
"AcDb3dPolyline"))) but AcDb2dPolyline was not filtered.
POLYLINE have two 100 code value, one is (100 . AcDbEntity) as a Common
Group Code, and the other is (AcDb2dPolyline or AcDb3dPolyline).
I guess two 100 code causes filtering failure.
Any ideas filtering with 100 code?

Thanks.

James Chung
cj...@opentown.net
http://home.opentown.net/~cjhjh/
Nothing is impossible, just requires time.

Jason Piercey

unread,
Mar 13, 2002, 10:55:12 PM3/13/02
to
That link doesn't seem to be functioning.

--
-Jason

Member of the Autodesk Discussion Forum Moderator Program


> http://www.caddzone.com/cvpoly.lsp


Tony Tanzillo

unread,
Mar 13, 2002, 10:49:21 PM3/13/02
to
The 100 group codes are not supported by selection
set filters.

See the following file for an example of how to
filter 3d polylines:

http://www.caddzone.com/cvpoly.lsp


"James Chung" <cj...@opentown.net> wrote in message
news:8A1ABECE281535F0...@in.WebX.maYIadrTaRb...

John Uhden

unread,
Mar 13, 2002, 11:09:45 PM3/13/02
to
Try this filter... '((0 . "POLYLINE")(-4 . "&")(70 . 8))

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juh...@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711


"James Chung" <cj...@opentown.net> wrote in message news:8A1ABECE281535F0...@in.WebX.maYIadrTaRb...

Tony Tanzillo

unread,
Mar 13, 2002, 11:25:35 PM3/13/02
to
Sigh - The ISP's unix server uses case-sensitive filenames
which has become a major problem that I'm working on.

It should work now.

"Jason Piercey" <discussio...@autodesk.com> wrote in message
news:DD416A6937B6952C...@in.WebX.maYIadrTaRb...

cvpoly.lsp

James Chung

unread,
Mar 13, 2002, 11:30:53 PM3/13/02
to
Thanks Tony.


"Tony Tanzillo" <tony.tanzillo at caddzone dot com> wrote in message
news:805BD3D801F12A5C...@in.WebX.maYIadrTaRb...


----------------------------------------------------------------------------
----


;; CVPOLY.LSP Copyright 1996, 1997 Tony Tanzillo all rights reserved
;;
;; Converts 3D polylines to 2D polylines that lie on
;; the XY plane of the current UCS.

(setq filter:3dpoly
'( (-4 . "<AND")
(0 . "POLYLINE")
(-4 . "&=")
(70 . 8)
(-4 . "AND>")
)
)

(defun get (key alist)
(cdr (assoc key alist))
)

(defun UCSZdir ()
(trans '(0 0 1) 0 1)
)

(defun UCSPoint2D (wcspoint)
( (lambda (p)
(list (car p) (cadr p) 0.0)
)
(trans wcspoint 0 1)
)
)

(defun mapvertex (e function / e d rslt)
(while (/= "SEQEND" (get 0 (setq d (entget (setq e (entnext e))
'("*")))))
(setq rslt
(cons
( (lambda (function data / e d rslt)
(apply function (list data))
)
function
d
)
rslt
)
)
)
(reverse rslt)
)

(defun cvpoly (pline / data ucs)
(setq data (entget pline '("*")))
(entmake
(subst
(cons 70 (logand (get 70 data) (~ 8)))
(assoc 70 data)
(subst
(cons 210 (setq ucs (ucszdir)))
(assoc 210 data)
(subst
'(100 . "AcDb2dPolyline")
'(100 . "AcDb3dPolyline")
data
)
)
)
)

(mapvertex pline
'(lambda (data)
(if (zerop (logand (get 70 data) 9))
(entmake
(list
'(0 . "VERTEX")
'(100 . "AcDbEntity")
(assoc 8 data)
'(100 . "AcDbVertex")
'(100 . "AcDb2dVertex")
(cons 10 (UCSPoint2d (get 10 data)))
(cons 70 (logand (get 70 data) (~ 32)))
)
)
)
)
)

(entmake '((0 . "SEQEND")))

(entdel pline)
)

(defun C:CVPOLY ( / ss i)
(cond
( (not (setq ss (ssget filter:3dpoly)))
(princ "\nNo 3D Polylines selected."))
(t (setvar "CMDECHO" 0)
(command "._UNDO" "_Begin")
(repeat (setq i (sslength ss))
(cvpoly (ssname ss (setq i (1- i))))
)
(command "._UNDO" "_En")
)
)
(princ)
)

(princ "\nCVPOLY.LSP Copyright 1997 Tony Tanzillo")
(princ "\nCVPOLY command loaded.")
(princ)
;; END CVPOLY.LSP

0 new messages