vernonlee Posted April 9, 2015 Share Posted April 9, 2015 Anyone can help to see where i can insert "AcDbAlignedDimension" to allow aligned dimension to be deleted as well. Got this LISP from another website. Thanks ;; DELETE DIMENSION BASE ON SELECTIVE BLOCKS ;; (defun c:DIMDELS (/ ss i sn name lst) (vl-load-com) ;;; ------ Tharwat 15. June. 2012 ----- ;;; ;;; codes to delete all dimensions entities in the ;;; ;;; selected blocks ;;; (if (not acdoc) (setq acdoc (vla-get-activedocument (vlax-get-acad-object))) ) (if (setq ss (ssget "_:L" '((0 . "INSERT")))) (repeat (setq i (sslength ss)) (setq sn (ssname ss (setq i (1- i)))) (if (not (member (setq name (cdr (assoc 2 (entget sn)))) lst)) (progn (setq lst (cons name lst)) (vlax-for each (vla-item (vla-get-blocks acdoc) name) (if (eq (vla-get-objectname each) "AcDbRotatedDimension") (vla-delete each)) ) ) ) ) (princ) ) (if ss (vla-regen acdoc AcAllviewports)) (princ) ) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 9, 2015 Share Posted April 9, 2015 Replace the highlighted object name as per the one you want to change . (if (eq (vla-get-objectname each) "[color="blue"]AcDbRotatedDimension[/color]") ... ... Quote Link to comment Share on other sites More sharing options...
vernonlee Posted April 9, 2015 Author Share Posted April 9, 2015 Replace the highlighted object name as per the one you want to change . I have tested that previously & yes it works. To clarify, I am not sure how to but what I would like to is to have both to be included in the LISP. Possible? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 9, 2015 Share Posted April 9, 2015 I have tested that previously & yes it works. To clarify, I am not sure how to have both to be included in the LISP. Possible? Yes , replace it with this . (if (wcmatch (vla-get-objectname each) "AcDbRotatedDimension,AcDbAlignedDimension") ........ Quote Link to comment Share on other sites More sharing options...
vernonlee Posted April 9, 2015 Author Share Posted April 9, 2015 Thanks Tharwat. It works. Apologies I forgotten that i wanted to include angled dimension as well. I can only find the code for aligned dimension but not for angle. Any advise on that? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 9, 2015 Share Posted April 9, 2015 Thanks Tharwat. It works. You are welcome . Apologies I forgotten that i wanted to include angled dimension as well. I can only find the code for aligned dimension but not for angle. Any advise on that? Add the following as I did in the last modification . "AcDb2LineAngularDimension" I have just saw your PM into the other forum , anyway I am just following your request here Quote Link to comment Share on other sites More sharing options...
vernonlee Posted April 9, 2015 Author Share Posted April 9, 2015 Thanks bro for your help PMed you at the other forum at first. Did not know you are active here as well Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 9, 2015 Share Posted April 9, 2015 Thanks bro for your help PMed you at the other forum at first. Did not know you are active here as well You are welcome Quote Link to comment Share on other sites More sharing options...
vernonlee Posted April 10, 2015 Author Share Posted April 10, 2015 Found out can add the following as well. AcDbRadialDimension AcDbDiametricDimension Quote Link to comment Share on other sites More sharing options...
vernonlee Posted April 10, 2015 Author Share Posted April 10, 2015 It now deletes every dimension known to man ............ except Arch Length EDIT Just found the answer AcDbArcDimension Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 10, 2015 Share Posted April 10, 2015 Are you after deleting all dimension objects in blocks ? Quote Link to comment Share on other sites More sharing options...
vernonlee Posted April 10, 2015 Author Share Posted April 10, 2015 Yes Tharwat. Base on selective blocks. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 10, 2015 Share Posted April 10, 2015 Yes Tharwat. Base on selective blocks. So just replace all the previous object names with this one . AcDb*Dimension Quote Link to comment Share on other sites More sharing options...
vernonlee Posted April 10, 2015 Author Share Posted April 10, 2015 Thanks Tharwat. Learn a bit more everyday Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 10, 2015 Share Posted April 10, 2015 Thanks Tharwat. Learn a bit more everyday You're welcome 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.