ThomasT1976 Posted April 18, 2012 Share Posted April 18, 2012 Hello, I've made a big calculation in a Pipe Stress Analysis program and the program has auto created 10 autocad drawings that is used to find points in the system. The problem is that the program has random numbered (with no intelligence) and now I have a big report which for example points at a number some where in the 10 drawings, which is hopeless to find. I have attached 1 of the 10 drawings. So you have an idea of what i'm talking about. Can I somehow: 1. Find all numbers in this drawing. 2. Put them into Excel. 3. Sort them after size. 4. Add an extra column which tells which drawing I can find the number. 5. Last put all the numbers from all the drawing into one Excel sheet and sort them after size, now I have a number index, so I can find which number is in which drawing and that would be a BIG help. My big problem is number 1: Can Autocad find all numbers in a drawing and let me copy them to Excel for editing? Help will be REALLY appriciated, THANKS! :) Train D.dwg Quote Link to comment Share on other sites More sharing options...
monkey7 Posted April 18, 2012 Share Posted April 18, 2012 I think the command 'eattext' is the one you are looking for. It requires a little practice and Excel experience to work with it properly but it enables you to output almost everything in a drawing. In this specific case you would only export text entities with their 'content' property and take the rest of the processing to Excel. You should even be able to select all 10 drawings at once in the eattext wizard and add the drawing name property to each entity, but I've never done that personally. Quote Link to comment Share on other sites More sharing options...
MSasu Posted April 18, 2012 Share Posted April 18, 2012 (edited) An AutoLISP approach: ;;; Extract Report of Text (18-IV-2012) (defun c:ERT( / index itemsText valueText ) (if (setq index 0 itemsText (ssget "_X" '((0 . "TEXT")))) (repeat (sslength itemsText) (setq valueText (cdr (assoc 1 (entget (ssname itemsText index))))) (if (distof valueText) (prompt (strcat "\n" valueText "\t" (getvar "DWGNAME"))) ) (setq index (1+ index)) ) ) (textscr) (princ) ) Use Copy / Paste to move the report to Excel. Edited April 18, 2012 by MSasu Modified the code Quote Link to comment Share on other sites More sharing options...
ThomasT1976 Posted April 18, 2012 Author Share Posted April 18, 2012 Thanks a lot. I'll look into it right away. Hope it works for me Quote Link to comment Share on other sites More sharing options...
MSasu Posted April 18, 2012 Share Posted April 18, 2012 Please check the modified version of the code. 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.