; Rev2Poly Tool to decurve the revcloud ; https://www.cadtutor.net/forum/topic/50989-select-all-revclouds-in-current-drawing/?do=findComment&comment=423835 ;; Tharwat 13.03.2014 ;; ; modified ; OP: ; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/seek-a-lisp-to-change-revclound-to-polygon-with-specific-layer/m-p/13145213#M474617 (defun c:Rev2Poly (/ a bu e e1 i ii l lts lty lyr p s typ v) (vl-load-com) (setq lyr "HAHA" lts 0.5 lty "DIVIDE" d (vla-get-activedocument (vlax-get-acad-object)) ) (vla-startundomark d) (princ"\nPick Revcloud.. ") (if (setq s (ssget '((0 . "LWPOLYLINE") (-4 . "/=") (42 . 0) (-4 . ">") (90 . 4)))) (repeat (setq i (sslength s)) (setq e (ssname s (setq i (1- i))) a (length (vl-remove-if-not '(lambda (u) (and (eq (car u) 42) (not (eq (cdr u) 0)))) (entget e))) p (length (vl-remove-if-not '(lambda (u) (eq (car u) 10)) (entget e))) v (atoi(getvar"acadver")) typ (if (< v 24)(princ "")(princ "AcDbPolyline (Revcloud)")) ) (if (not (and (or (eq a p) (eq (1+ a) p)) (eq (getpropertyvalue e "Classname") typ) ) ) (ssdel e s) (progn ; else (command"_.Pedit" e "_Decurve" "") (if (tblsearch "LAYER" lyr)(setpropertyvalue e "LayerId" (tblobjname "LAYER" lyr))) (if (tblsearch "LTYPE" lty)(setpropertyvalue e "LinetypeId" (tblobjname "LTYPE" lty))) (setpropertyvalue e "LinetypeScale" lts) ); progn ) ; if ) ; repeat ) ; if (vla-endundomark d) (princ) ) ;_ end of defun