home *** CD-ROM | disk | FTP | other *** search
- ;;;---------------------------------------------------------------------------;
- ;;;
- ;;; PLUD.LSP ¬⌐Ñ╗ 0.5
- ;;;
- ;;; (C) ¬⌐┼v 1988-1992 Autodesk ñ╜Ñq
- ;;;
- ;;; Ñ╗╡{ªíñwÑ╤ Autodesk ñ╜Ñq╡∙ÑU¬⌐┼v, ╢╚⌐≤ñU¡z▒í¬pñUÑi▒┬╗P▒zíu│\ÑiívíC
- ;;; ╗╒ñUñú▒oÑHÑ⌠ª≤º╬ªí╡oªµ⌐╬ÑX¬⌐ª╣╡{ªí¬║íu¡∞⌐l╜Xív; ª²ñ╣│\▒zªb»S⌐w¡lÑ═
- ;;; ¬║ñuº@ñW╡▓ªXª╣╡{ªí¬║íuÑ╪¬║╜Xív¿╧Ñ╬íCª│├÷│o├■¡lÑ═ñuº@¬║▒°Ñ≤ªpñU:
- ;;;
- ;;; ( i) │]¡pñW╗Pñuº@ñW¼╥»┬║Θ░w╣∩ Autodesk ñ╜Ñq¬║▓ú½~íC
- ;;; (ii) ╕ⁿª│íu¬⌐┼v (C) 1988-1992 Autodesk ñ╜Ñqív¬║¬⌐┼v│qºiíC
- ;;;
- ;;;
- ;;;
- ;;; AUTODESKñ╜Ñq┤ú¿╤ª╣╡{ªí╢╚¿╤º@íu├■ªⁿív¬║░╤ª╥, ª╙ÑBñú▒╞░úª│Ñ⌠ª≤┐∙╗~¬║
- ;;; Ñi»αíCAUTODESKñ╜Ñq»Sª╣º_╗{Ñ⌠ª≤»S⌐wÑ╬│~ñº╛A║┘⌐╩, ÑHñ╬░╙╖~╛P░Γ⌐╥┴⌠ºt
- ;;; ÑX¿π¬║½O├╥íCAUTODESKñ╜ÑqªP«╔ÑτñúÑX¿πª╣╡{ªí░⌡ªµ«╔ñ@⌐wñú╖|íuññ┬_ív⌐╬
- ;;; íuº╣Ñ■╡L╗~ív¬║½O├╥íC
- ;;;
- ;;;
- ;;; by Kieran V. McKeogh
- ;;; 22 October 1991
- ;;;
- ;;;---------------------------------------------------------------------------;
- ;;; DESCRIPTION
- ;;;
- ;;; An AutoLISP routine allowing users to toggle the selected polylines
- ;;; between the two modes of linetype generation, either generation
- ;;; between the vertices or the new method, along the complete polyline.
- ;;;
- ;;;---------------------------------------------------------------------------;
-
- ;;;---------------------------------------------------------------------------;
- ;;; Internal error handler.
- ;;;---------------------------------------------------------------------------;
-
- (defun plud_err (s) ;If an error (such as CTRL-C) occurs
- ;while this command is active...
- (if (/= s "Function cancelled")
- (princ (strcat "\n┐∙╗~: " s))
- )
- (setq *error* old_err) ;Restore old *error* handler
- (princ)
- )
- ;;;---------------------------------------------------------------------------;
-
- ;;;---------------------------------------------------------------------------;
- ;;; The Main Function.
- ;;;---------------------------------------------------------------------------;
-
- (defun c:plud(/ a method plud_ss pline_info old new)
-
- (setq old_err *error* ; Use special error handling function.
- *error* plud_err)
-
- (initget "Full Segment")
- (setq method (getkword "FÑ■│í/S▓╒¼q <FÑ■│í>: "))
- (setq a 0)
- (cond
- ((= "Segment" method) ; find all polylines with 128 bit set
- (setq plud_ss
- (ssget (list (cons 0 "POLYLINE")(cons -4 "&=")(cons 70 128)))
- )
- )
- (T ; find all 2D polylines with 128 bit not set
- (setq plud_ss (ssget (list (cons 0 "POLYLINE")
- (cons -4 "<NOT")
- (cons -4 "&")(cons 70 248)
- (cons -4 "NOT>")
- )))
- )
- )
- (if plud_ss
- (progn
- (while (< a (sslength plud_ss))
- (setq pline_info (entget (ssname plud_ss a)))
- (setq old (assoc '70 pline_info))
- (if (= "Segment" method)
- (setq new (cons 70 (logand (cdr old) (~ 128)))) ; remove 128 bit
- (setq new (cons 70 (logior (cdr old) 128))) ; add 128 bit
- )
- (entmod (subst new old pline_info))
- (setq a (1+ a))
- )
- )
- )
- (princ (strcat (itoa a) " ▒°íu╗EªX╜uívº≤╖síC"))
- (princ)
- )
-
- ;;;---------------------------------------------------------------------------;