Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/01/2020 in all areas

  1. Here's my offering based on the example drawing: (defun c:foo (/ i l p r s sp) ;; RJP » 2020-01-31 (setq i 1.05) (setq l "BubbleLicious") (cond ((setq s (ssget '((0 . "*POLYLINE,LINE")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq p (vl-sort (list (vlax-curve-getstartpoint e) (vlax-curve-getendpoint e)) '(lambda (r j) (< (car r) (car j))) ) ) (setq r (cons (entmakex (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(67 . 0) (cons 8 l) '(100 . "AcDbPolyline") '(90 . 4) '(70 . 129) '(43 . 0.) '(38 . 0.) '(39 . 0.) (cons 10 (mapcar '+ (car p) (list 0 i 0))) '(42 . 1.) (cons 10 (mapcar '- (car p) (list 0 i 0))) (cons 10 (mapcar '- (cadr p) (list 0 i 0))) '(42 . 1.) (cons 10 (mapcar '+ (cadr p) (list 0 i 0))) ) ) r ) ) ) (setq sp (vlax-ename->vla-object (cdr (assoc 330 (entget (car r)))))) (setq s (vlax-invoke sp 'addregion (mapcar 'vlax-ename->vla-object r))) (mapcar 'entdel r) (setq r (ssadd)) (foreach x s (vla-put-layer x l) (ssadd (vlax-vla-object->ename x) r)) (setvar 'cmdecho 0) (command "_.union" r "") (setvar 'cmdecho 1) ) ) (princ) ) What are you going to do with all your free time now!
    1 point
  2. Written for fun and practice - a windows form project (the .rar contains the .exe file of the program). Now you don't have to need to run ACAD for just to strip the code with LISP. EDIT: Updated the program (included a vertical bar, so one could scroll through the code) - I've forgot that they can get quite lengthy Also modified a bit the default regex pattern, so it would strip also patterns like [color=#87d6ee] or ( previous pattern was looking just for ) ForumCodeTags.rar
    1 point
  3. In fact my intention was simple, in order to clean up the [BBcodes] within the new code tags in this forum. Therefore, IMO optimized with CLIPBOARD without using 'getfiled' is much more convenient, isn't it? code updated - post#1 Copy text (from forum) -> run 'FORUM' (in ACAD) -> [Ctrl+V] Paste (in forum active editor) Done!
    1 point
×
×
  • Create New...