lucas3 Posted December 23, 2013 Share Posted December 23, 2013 In the Internet to download (deldup.zip Duplicate-line-removale.lsp DUPREM .lsp DupRem.Lsp ), Bad use The overkill & ncopy from ET tool ,It is very good But ,Company computer is not installed ET tool ,Who can help ? The same function of that , LISP ,FAS, VLX ,all OK Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 23, 2013 Share Posted December 23, 2013 Call your IT department and tell them they forget to install a component of the program that you paid good money for and to install Express Tools on your computer. It should take no more than 10 minutes. Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted December 23, 2013 Share Posted December 23, 2013 (edited) For ncopy, I can't help, but for remove duplicate + 0 lines, try this : (defun unique ( linlst ) (if (car linlst) (cons (car linlst) (unique (_vl-remove (car linlst) (_vl-remove (list (cadar linlst) (caar linlst)) (cdr linlst) 1e-6) 1e-6)))) ) (defun _vl-remove ( el lst fuzz ) (vl-remove-if '(lambda ( x ) (and (equal (car x) (car el) fuzz) (equal (cadr x) (cadr el) fuzz))) lst) ) (defun eraseduplin ( ss / i lin p1 p2 lay col62 col420 linlst linlsta linlstn ) (setq i -1) (while (setq lin (ssname ss (setq i (1+ i)))) (setq p1 (cdr (assoc 10 (entget lin))) p2 (cdr (assoc 11 (entget lin))) lay (cdr (assoc 8 (entget lin))) col62 (cdr (if (assoc 62 (entget lin)) (assoc 62 (entget lin)) nil)) col420 (cdr (if (assoc 420 (entget lin)) (assoc 420 (entget lin)) nil)) ) (setq linlsta (cons (list p1 p2 lay col62 col420) linlsta)) (setq linlst (cons (list p1 p2) linlst)) (entdel lin) ) (setq linlstn (unique linlst)) (foreach lin linlsta (if (vl-some '(lambda ( x ) (and (equal (car x) (car lin) 1e- (equal (cadr x) (cadr lin) 1e-)) linlstn) (setq linlstn (subst lin (list (car lin) (cadr lin)) linlstn)) ) ) (foreach lin linlstn (entmake (vl-remove nil (list '(0 . "LINE") (cons 8 (caddr lin)) (if (cadddr lin) (cons 62 (cadddr lin))) (if (caddr (cddr lin)) (cons 420 (caddr (cddr lin)))) (cons 10 (car lin)) (cons 11 (cadr lin))))) ) (- (length linlsta) (length linlstn)) ) (defun c:eraseduplines-0lines ( / ss s i k lin ) (setq ss (ssget "_:L" '((0 . "LINE")))) (setq s (ssadd)) (setq i -1) (setq k 0) (while (setq lin (ssname ss (setq i (1+ i)))) (if (equal (cdr (assoc 10 (entget lin))) (cdr (assoc 11 (entget lin))) 1e-4) (progn (setq k (1+ k)) (entdel lin)) (ssadd lin s)) ) (prompt "\nTotal : ")(princ (eraseduplin s))(prompt " duplicate-lines erased") (prompt "\nTotal : ")(princ k)(prompt " zero-lines erased") (princ) ) (defun c:ed0l nil (c:eraseduplines-0lines)) M.R. Edited December 23, 2013 by marko_ribar Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted December 23, 2013 Share Posted December 23, 2013 But ,Company computer is not installed ET tool ,Who can help ? Your company IS/IT department. Just get them to install it for you. Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 23, 2013 Author Share Posted December 23, 2013 Call your IT department and tell them they forget to install a component of the program that you paid good money for and to install Express Tools on your computer. It should take no more than 10 minutes. More troublesome,I am a rookie! Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 23, 2013 Share Posted December 23, 2013 It doesn't matter that you are a rookie, a newbie or a neophyte. The point is that Express Tools is included with the purchased software at no additional cost and should have been installed the first time round. That's one of the problems with IT departments that aren't familiar with AutoCAD. They routinely overlook Express Tools. Tell them to load it and you won't have to resort to work-arounds like begging for free code to do what is already available to you. You're just lucky someone is willing to provide you with a temporary solution to Overkill. What if you want to explode text? There is a command for that in ET. What if you want to make a custom linetype or custom shape? There are commands for that in ET. What if you want to create arc aligned text? There is a tool for that in ET. Get my point? Give me one good reason why you shouldn't get what your company paid for? Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 23, 2013 Share Posted December 23, 2013 Then show them you are a rookie who knows what he is doing, a big part of any job is having the confidence and communication skills to get your ideas across to the rest of the world, whatever they are. Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 23, 2013 Share Posted December 23, 2013 Just to be clear, if you look on the Menu Bar the words "Express Tools" is not displayed. Is that correct? Quote Link to comment Share on other sites More sharing options...
flyfox1047 Posted December 23, 2013 Share Posted December 23, 2013 (edited) Remove duplicate objects,Support text, circle,line ,pline,block (defun C:DUPREM (/ F1 SLE SA CA TA LA LB ENTA EA TYPA A1 A2 A3 A4 SC LTEST TES ) (setq F1 NIL F1 0 ) (or :GCHOICE (setq :GCHOICE "Set")) (initget "Set Limits All") (setq SLE (getkword (strcat "\nSelect set type [set/Limits/All] <" :GCHOICE ">: " ) ) ) (if (not SLE) (setq SLE :GCHOICE) (setq :GCHOICE SLE) ) (cond ((= SLE "Set") (setq SA (ssget))) ((= SLE "Limits") (setq SA (ssget "c" (getvar "extmin") (getvar "extmax"))) ) ((= SLE "All") (setq SA (ssget "X"))) ) (if (and SA (= (type SA) 'PICKSET) (not (zerop (sslength SA)))) (progn (setq CA 0 TA (sslength SA) LA NIL LB NIL ) (while (< CA TA) (setq ENTA (ssname SA CA) EA (cdr (entget ENTA)) TYPA (cdr (assoc 0 EA)) ) (setq A1 (assoc 5 EA)) (setq A2 (cons 5 "")) (setq EA (subst A2 A1 EA)) (if (wcmatch (getvar "ACADVER") "*15*") (progn (setq A3 (assoc 330 EA)) (setq A4 (cons 330 "")) (setq EA (subst A4 A3 EA)) ) ) (setq LA (cons ENTA LA) LB (cons EA LB) CA (+ CA 1) ) ) (setq SC NIL SC (ssadd) LTEST LB ) (setq CA 0) (setq TES (car LTEST) LTEST (cdr LTEST) TA NIL TA (length LTEST) ) (while (/= TA 0) (if (member TES LTEST) (progn (setq SC (ssadd (nth CA LA) SC)) (setq F1 (+ F1 1)) ) ) (setq CA (+ CA 1)) (setq TES (car LTEST) LTEST (cdr LTEST) TA (length LTEST) ) ) (command "erase" SC "") (redraw) (prompt "\n") (prin1 F1) (prompt " object is deleted.") ) ) (princ) ) copy object from block(This like ncopy): ;xshrimp 2009.3.13 (defun c:nn ( / acaddocument acadobject blockobj blockrefobj i mspace n nent obj objent) (VL-LOAD-COM) (defun make*ublock(obj / blockobj) (setq blockObj (vla-add (vla-get-Blocks AcadDocument) (vlax-3d-point (list 0 0 0)) "*U" ) ) (vla-CopyObjects AcadDocument (vlax-safearray-fill (vlax-make-safearray vlax-vbObject (cons 0 0) ) (list obj) ) blockObj ) (vla-delete obj) (vla-get-name blockObj) ) (setq AcadObject (vlax-get-acad-object) AcadDocument (vla-get-ActiveDocument Acadobject) mSpace (vla-get-ModelSpace Acaddocument) ) (if (= (length (setq nent (nentsel))) 4) (progn (entmake (entget (car nent))) (setq objent (vlax-ename->vla-object (entlast))i 0) (foreach n (last nent) (setq obj (vlax-ename->vla-object n)) (setq blockRefObj ( vla-InsertBlock mSpace (vla-get-InsertionPoint obj) (make*ublock objent ) (vla-get-xScaleFactor obj) (vla-get-yScaleFactor obj) (vla-get-zScaleFactor obj) (vla-get-Rotation obj) ) ) (setq i (1+ i)) (if(> i 1) (command "_.explode" (entlast)) ) (setq objent(vlax-ename->vla-object (entlast))) );end foreach (command "_.explode" (entlast)) (sssetfirst nil (ssget "p")) ) ) (prin1) ) Edited December 23, 2013 by flyfox1047 Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 23, 2013 Share Posted December 23, 2013 (edited) Let’s assume, for a moment, it just got overlooked. Close AutoCAD. Click on the Windows Start button. Click on Control Panel. Click on Programs and Features. Select your AutoCAD 2012 product from the list. Click on “Uninstall/Change” keeping in mind we are not uninstalling rather we are using the Change feature. Click “Add or Remove Features”. Check off (enable) the box for Express Tools. Click Update. After the update is completed click “Finish”. Open AutoCAD. At the command line type MENULOAD. Select “acetmain” and click Open. Click “Load”. Now verify that Express Tools has been loaded by looking for EXPRESS in the Loaded Customizations Group window. Click Close. Go use your new Express Tools. Edited December 24, 2013 by ReMark Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 23, 2013 Share Posted December 23, 2013 I'm just curious. For those of you posting code that emulate commands in Express Tools are you willing to continuing doing so if the OP comes back later and says he needs the TXT2MTEXT, SUPERHATCH or REPLACE BLOCK commands? Quote Link to comment Share on other sites More sharing options...
flyfox1047 Posted December 23, 2013 Share Posted December 23, 2013 (edited) For ncopy, I can't help, but for remove duplicate + 0 lines, try this : (defun unique ( linlst ) (if (car linlst) (cons (car linlst) (unique (_vl-remove (car linlst) (_vl-remove (list (cadar linlst) (caar linlst)) (cdr linlst) 1e-6) 1e-6)))) ) (defun _vl-remove ( el lst fuzz ) (vl-remove-if '(lambda ( x ) (and (equal (car x) (car el) fuzz) (equal (cadr x) (cadr el) fuzz))) lst) ) (defun eraseduplin ( ss / i lin p1 p2 lay col62 col420 linlst linlsta linlstn ) (setq i -1) (while (setq lin (ssname ss (setq i (1+ i)))) (setq p1 (cdr (assoc 10 (entget lin))) p2 (cdr (assoc 11 (entget lin))) lay (cdr (assoc 8 (entget lin))) col62 (cdr (if (assoc 62 (entget lin)) (assoc 62 (entget lin)) nil)) col420 (cdr (if (assoc 420 (entget lin)) (assoc 420 (entget lin)) nil)) ) (setq linlsta (cons (list p1 p2 lay col62 col420) linlsta)) (setq linlst (cons (list p1 p2) linlst)) (entdel lin) ) (setq linlstn (unique linlst)) (foreach lin linlsta (if (vl-some '(lambda ( x ) (and (equal (car x) (car lin) 1e- (equal (cadr x) (cadr lin) 1e-)) linlstn) (setq linlstn (subst lin (list (car lin) (cadr lin)) linlstn)) ) ) (foreach lin linlstn (entmake (vl-remove nil (list '(0 . "LINE") (cons 8 (caddr lin)) (if (cadddr lin) (cons 62 (cadddr lin))) (if (caddr (cddr lin)) (cons 420 (caddr (cddr lin)))) (cons 10 (car lin)) (cons 11 (cadr lin))))) ) (- (length linlsta) (length linlstn)) ) (defun c:eraseduplines-0lines ( / ss s i k lin ) (setq ss (ssget "_:L" '((0 . "LINE")))) (setq s (ssadd)) (setq i -1) (setq k 0) (while (setq lin (ssname ss (setq i (1+ i)))) (if (equal (cdr (assoc 10 (entget lin))) (cdr (assoc 11 (entget lin))) 1e-4) (progn (setq k (1+ k)) (entdel lin)) (ssadd lin s)) ) (prompt "\nTotal : ")(princ (eraseduplin s))(prompt " duplicate-lines erased") (prompt "\nTotal : ")(princ k)(prompt " zero-lines erased") (princ) ) (defun c:ed0l nil (c:eraseduplines-0lines)) M.R. Hi!M.R.Very highlights to see you again, This code about "copy object from block " ,have a little small flaws:only single choice ,can you help me change to multi-choice? thank you! ;xshrimp 2009.3.13 (defun c:nn ( / acaddocument acadobject blockobj blockrefobj i mspace n nent obj objent) (VL-LOAD-COM) (defun make*ublock(obj / blockobj) (setq blockObj (vla-add (vla-get-Blocks AcadDocument) (vlax-3d-point (list 0 0 0)) "*U" ) ) (vla-CopyObjects AcadDocument (vlax-safearray-fill (vlax-make-safearray vlax-vbObject (cons 0 0) ) (list obj) ) blockObj ) (vla-delete obj) (vla-get-name blockObj) ) (setq AcadObject (vlax-get-acad-object) AcadDocument (vla-get-ActiveDocument Acadobject) mSpace (vla-get-ModelSpace Acaddocument) ) (if (= (length (setq nent (nentsel))) 4) (progn (entmake (entget (car nent))) (setq objent (vlax-ename->vla-object (entlast))i 0) (foreach n (last nent) (setq obj (vlax-ename->vla-object n)) (setq blockRefObj ( vla-InsertBlock mSpace (vla-get-InsertionPoint obj) (make*ublock objent ) (vla-get-xScaleFactor obj) (vla-get-yScaleFactor obj) (vla-get-zScaleFactor obj) (vla-get-Rotation obj) ) ) (setq i (1+ i)) (if(> i 1) (command "_.explode" (entlast)) ) (setq objent(vlax-ename->vla-object (entlast))) );end foreach (command "_.explode" (entlast)) (sssetfirst nil (ssget "p")) ) ) (prin1) ) Edited December 23, 2013 by flyfox1047 Quote Link to comment Share on other sites More sharing options...
Tharwat Posted December 23, 2013 Share Posted December 23, 2013 Hi!M.R.Very highlights to see you again, This code about "copy object from block " ,have a little small flaws:only single choice ,can you help me change to multi-choice? thank you! Don't you think that you posted your request to marko in the wrong place ? Quote Link to comment Share on other sites More sharing options...
GP_ Posted December 23, 2013 Share Posted December 23, 2013 (edited) Since Autocad2012 OVERKILL is a built-in command (very fast). Edited January 6, 2014 by GP_ Quote Link to comment Share on other sites More sharing options...
Cad64 Posted December 23, 2013 Share Posted December 23, 2013 Off topic posts moved to chat forum: http://www.cadtutor.net/forum/showthread.php?83661-Cattle-People-Off-topic-chat-moved-from-Lisp-forum Quote Link to comment Share on other sites More sharing options...
Debalance Posted December 28, 2013 Share Posted December 28, 2013 Use TotalPurge instead of OVERKILL. See this post. Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 28, 2013 Share Posted December 28, 2013 I disagree with the above. Install Express Tools and be done with it. ET is free; TotalPurge is not. Quote Link to comment Share on other sites More sharing options...
Debalance Posted December 28, 2013 Share Posted December 28, 2013 Install Express Tools and be done with it. ET is free; TotalPurge is not. Yes, TotalPurge is not free, but it works faster. Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted December 28, 2013 Share Posted December 28, 2013 Instead of OVERKILL, you could just use DUPREM.lsp from here : http://www.cadtutor.net/forum/showthread.php?83657-I-need-overkill-and-ncopy-!please-help-me!&p=#9 and edo0l.lsp from here : http://www.cadtutor.net/forum/showthread.php?83675-Merry-Christmas%EF%BC%8CI-need-help!&p=#3 They are totally free, and ab speed I think its satisfactory... Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 28, 2013 Share Posted December 28, 2013 The OP has had time to contact his IT department and get Express Tools installed in one of two ways previously mentioned. If he has failed to do so then that's entirely his fault. You can lead a horse to water but you can't make him drink. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.