초오오보Lv.0 등록일: 2020-05-052020-05-05T16:54:33+09:00 2020-05-05T16:54:33+09:00카테고리: AutoCAD & CADian 중복된블럭 삭제하기 블록 수량세다가 블록이 겹쳐져 있어 수량이 중복계산 됩니다 겹친블록 하나는 삭제하고 싶은데 리습이 없네요 Overkill 은 라인만되고 블럭은 안되네요 공유 Facebook 관련 있는 질문들 jsk.shx 파일 받을 부탁드립니다 ㅠ 오토캐드 마지막 화면으로 실행 안됨 오토캐드 마지막 화면으로 실행 안됨 도서관 도면 구합니다. ! 3 답변 작성 순 최신 순 공감 순 일탈은떵꿈 Lv.0 2020-05-05T18:50:54+09:00답변 등록 답변 등록 일시 2020-05-05 6:50 pm http://www.lee-mac.com/dynamicblockcounter.html블럭이름이 바뀐것이 있나 먼저 확인해 보세요 저도 개고생 한기억이 ㅠㅠ 초오오보 Lv.0 2020-05-06T09:03:19+09:00답변 등록 답변 등록 일시 2020-05-06 9:03 am 네 중첩되어 있는 블록이 삭제가 안됩니다 다른건 되는데… ♡GISKOREA♡ Lv.1 2020-05-08T17:34:08+09:00답변 등록 답변 등록 일시 2020-05-08 5:34 pm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; 중복심볼 삭제하기 ;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun c:XXB( / ss ssdup ct len e eb pt lay bname ang sclx scly sclz obj obj_list) (princ “nSelect block objects.”) ;Select objects and filter all but block insert objects. (setq ss (ssget (list (cons 0 “INSERT”)))) (if ss ;If any valid objects were selected. (progn (princ “nBuilding list of objects.”) (setq ssdup (ssadd)) ;Initialize new selection set to hold objects to delete (setq len (sslength ss)) ;Find out how many objects were selected. (setq ct 0) (while (< ct len) ;Loop through selected objects (setq e (ssname ss ct)) ;Get an object name (setq eb (entget e)) ;Get the entity list from the object name (setq ct (+ ct 1)) ;Increment index into selection set (setq pt (cdr (assoc 10 eb))) ;Access object’s coordinate (setq lay (cdr (assoc 8 eb))) ;Access object’s layer (setq bname (cdr (assoc 2 eb))) ;Access object’s block name (setq ang (cdr (assoc 50 eb))) ;Access object’s rotation angle (setq sclx (cdr (assoc 41 eb))) ;Access object’s x scale (setq scly (cdr (assoc 42 eb))) ;Access object’s y scale (setq sclz (cdr (assoc 43 eb))) ;Access object’s z scale ;Make list of object properties (setq obj (list pt lay bname ang sclx scly sclz)) (if (not (member obj obj_list)) ;If these properties are not already in list (setq obj_list (cons obj obj_list)) ;Add them to the list (ssadd e ssdup) ;Else add object to selection set to delete ) ;End if ) ;End of while loop (if (> (sslength ssdup) 0) ;If there are any objects in the selection set to delete (progn (princ “nDeleting duplicate objects.”) (setq len (sslength ssdup)) ;Find out how many many objects to delete. (setq ct 0) (while (< ct len) ;Loop through objects and delete. (setq e (ssname ssdup ct)) ;Get object name (setq ct (+ ct 1)) ;Increment index into selection set (entdel e) ;Delete duplicate object ) ;End of while loop (princ ;Print the number of objects deleted to command line (strcat “nDeleted ” (itoa len) ” duplicate objects.” )) ) ;End progn (princ “nNo duplicates found.”) ;Else no there were no duplicates to delete. ) ;End if ) ;End progn (princ “nNo block objects selected.”) ;Else there were no valid objects selected ) ;End if (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; 중복문자 삭제하기 ;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun c:XXT( / ss ssdup ct len e eb pt lay ang sty hgt str obj obj_list) (princ “nSelect text objects.”) ;Select objects and filter all but block insert objects. (setq ss (ssget (list (cons 0 “TEXT”)))) (if ss ;If any valid objects were selected. (progn (princ “nBuilding list of objects.”) (setq ssdup (ssadd)) ;Initialize new selection set to hold objects to delete (setq len (sslength ss)) ;Find out how many objects were selected. (setq ct 0) (while (< ct len) ;Loop through selected objects (setq e (ssname ss ct)) ;Get an object name (setq eb (entget e)) ;Get the entity list from the object name (setq ct (+ ct 1)) ;Increment index into selection set (setq pt (cdr (assoc 10 eb))) ;Access object’s coordinate (setq lay (cdr (assoc 8 eb))) ;Access object’s layer (setq ang (cdr (assoc 50 eb))) ;Access object’s rotation angle (setq sty (cdr (assoc 7 eb))) ;Access object’s text style (setq hgt (cdr (assoc 40 eb))) ;Access object’s text height (setq str (cdr (assoc 1 eb))) ;Access object’s text string ;Make list of object properties (setq obj (list pt lay ang sty hgt str)) (if (not (member obj obj_list)) ;If these properties are not already in list (setq obj_list (cons obj obj_list)) ;Add them to the list (ssadd e ssdup) ;Else add object to selection set to delete ) ;End if ) ;End of while loop (if (> (sslength ssdup) 0) ;If there are any objects in the selection set to delete (progn (princ “nDeleting duplicate objects.”) (setq len (sslength ssdup)) ;Find out how many many objects to delete. (setq ct 0) (while (< ct len) ;Loop through objects and delete. (setq e (ssname ssdup ct)) ;Get object name (setq ct (+ ct 1)) ;Increment index into selection set (entdel e) ;Delete duplicate object ) ;End of while loop (princ ;Print the number of objects deleted to command line (strcat “nDeleted ” (itoa len) ” duplicate objects.” )) ) ;End progn (princ “nNo duplicates found.”) ;Else no there were no duplicates to delete. ) ;End if ) ;End progn (princ “nNo text objects selected.”) ;Else there were no valid objects selected ) ;End if (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; 중복포인트 삭제하기 ;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun c:XXP( / ss ssdup ct len e eb pt lay obj obj_list) (princ “nSelect point objects.”) ;Select objects and filter all but valid objects. (setq ss (ssget (list (cons 0 “POINT”)))) (if ss ;If any valid objects were selected. (progn (princ “nBuilding list of objects.”) (setq ssdup (ssadd)) ;Initialize new selection set to hold objects to delete (setq len (sslength ss)) ;Find out how many objects were selected. (setq ct 0) (while (< ct len) ;Loop through selected objects (setq e (ssname ss ct)) ;Get an object name (setq eb (entget e)) ;Get the entity list from the object name (setq ct (+ ct 1)) ;Increment index into selection set (setq pt (cdr (assoc 10 eb))) ;Access object’s coordinate (setq lay (cdr (assoc 8 eb))) ;Access object’s layer ;Make list of object properties (setq obj (list pt lay)) (if (not (member obj obj_list)) ;If these properties are not already in list (setq obj_list (cons obj obj_list)) ;Add them to the list (ssadd e ssdup) ;Else add object to selection set to delete ) ;End if ) ;End of while loop (if (> (sslength ssdup) 0) ;If there are any objects in the selection set to delete (progn (princ “nDeleting duplicate objects.”) (setq len (sslength ssdup)) ;Find out how many many objects to delete. (setq ct 0) (while (< ct len) ;Loop through objects and delete. (setq e (ssname ssdup ct)) ;Get object name (setq ct (+ ct 1)) ;Increment index into selection set (entdel e) ;Delete duplicate object ) ;End of while loop (princ ;Print the number of objects deleted to command line (strcat “nDeleted ” (itoa len) ” duplicate objects.” )) ) ;End progn (princ “nNo duplicates found.”) ;Else no there were no duplicates to delete. ) ;End if ) ;End progn (princ “nNo point objects selected.”) ;Else there were no valid objects selected ) ;End if (princ) )
http://www.lee-mac.com/dynamicblockcounter.html
블럭이름이 바뀐것이 있나 먼저 확인해 보세요
저도 개고생 한기억이 ㅠㅠ
네 중첩되어 있는 블록이 삭제가 안됩니다