Cadet 84 Posted September 6, 2007 Share Posted September 6, 2007 Hi everybody, I use Auto CAD 2008. I have a heap of cracks on a concrete slab. There are over 300 lines..i need to know what the total length of the cracks are..is there a way of finding this out without actually adding up each indivitual line:? Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted September 6, 2007 Share Posted September 6, 2007 tlen.lsp will work. Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted September 6, 2007 Share Posted September 6, 2007 G'day Tyarna, Try the following lisp routine. But make sure you have exploded all the lines ( in case any of them are polylines). ;; QTY_LINE.LSP GET TOTAL LENGTH OFF ALL SELECTED LINES ;; ;; WRITTEN BY: Alan Cullen October 2000 ;; McPherson Maclean Wargon Chapman ;; CAIRNS ;; ;; START COMMAND: QTYL ;; ;; ;;-----------------------------MAIN PROGRAM------------------------------ (defun c:QTYL () ;;;(/ olderr a n index poly p1 p2) (princ "\n GET TOTAL LENGTH OFF ALL SELECTED LINES - October 2000 - Alan CULLEN") (setvar "CMDECHO" 0) (setq ssline (ssget '((0 . "LINE")))) (setq number (sslength ssline)) (setq total 0) (setq counter 0) (repeat number (setq name (ssname ssline counter)) (setq data (entget name)) (setq code10 (assoc 10 data)) (setq code11 (assoc 11 data)) (setq coord10 (cdr code10)) (setq coord11 (cdr code11)) (setq dist (distance coord10 coord11)) (setq total (+ total dist)) (setq counter (+ 1 counter)) ) (prompt (strcat "\n Total length of lines = "(rtos total) "........ No. of Lines = "(rtos number 2 0))) (princ) ) If you know nothing of lisp routines, get back to me. Quote Link to comment Share on other sites More sharing options...
Cadet 84 Posted September 6, 2007 Author Share Posted September 6, 2007 ok - no i don't know anything about lsp routines... sorry Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted September 6, 2007 Share Posted September 6, 2007 Okay, copy that code to notepad, then save it as QTY_LINE.LSP to a folder in your acad search path (probably acad\support). Then to load it type (load "QTY_LINE") at the command line. then type QTYL at the command line to fire it up. Then just pick all the lines you want the total length of. Get back to me if you are still having trouble. Quote Link to comment Share on other sites More sharing options...
Cadet 84 Posted September 6, 2007 Author Share Posted September 6, 2007 Ok, so i have down loaded what you sent to me Allan, and i have also downloaded tlen.lsp. I have no idea how to apply them to autocad though to get either one of the programs working.... by the way - hi Allan! Quote Link to comment Share on other sites More sharing options...
Cadet 84 Posted September 6, 2007 Author Share Posted September 6, 2007 ok i'll give that a try - thank you Quote Link to comment Share on other sites More sharing options...
Cad64 Posted September 6, 2007 Share Posted September 6, 2007 This should help: http://www.cadtutor.net/forum/showthread.php?t=2791 Quote Link to comment Share on other sites More sharing options...
Cadet 84 Posted September 6, 2007 Author Share Posted September 6, 2007 that was bloody excellent! Thankyou! that has saved sooooo much time! Your a champ! Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted September 6, 2007 Share Posted September 6, 2007 Tyarna, Please get back to us and let us know if you got either one working, and how you went with them. Quote Link to comment Share on other sites More sharing options...
Cadet 84 Posted September 6, 2007 Author Share Posted September 6, 2007 Alan, The msg above was directed to you. I didn't see CAD64 till after i had already applied your suggestion. It worked a treat. Thank you very much for your time and efforts. thank you too CAD 64, i read the link you sent it it has given me a much clearer understanding! Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted September 6, 2007 Share Posted September 6, 2007 Another satisfied customer. :lol: Tyarna, you gotta learn quick, mate. I'm expecting you to help us help others soon. Quote Link to comment Share on other sites More sharing options...
Cadet 84 Posted September 6, 2007 Author Share Posted September 6, 2007 Yeah, i am satisfied! Dunno about the helping other out. .. we'll see how i go LOL. Quote Link to comment Share on other sites More sharing options...
Raggi_Thor Posted September 6, 2007 Share Posted September 6, 2007 Here is detailed explanation from Lynn Allen on how to extract data to a table or excel: http://management.cadalyst.com/cadman/Column:++Circles+and+Lines/Circles-and-Lines-Extract-that-Data/ArticleStandard/Article/detail/452694?contextCategoryId=6733 Quote Link to comment Share on other sites More sharing options...
prabhathjp Posted April 20, 2009 Share Posted April 20, 2009 G'day Tyarna, Try the following lisp routine. But make sure you have exploded all the lines ( in case any of them are polylines). ;; QTY_LINE.LSP GET TOTAL LENGTH OFF ALL SELECTED LINES ;; ;; WRITTEN BY: Alan Cullen October 2000 ;; McPherson Maclean Wargon Chapman ;; CAIRNS ;; ;; START COMMAND: QTYL ;; ;; ;;-----------------------------MAIN PROGRAM------------------------------ (defun c:QTYL () ;;;(/ olderr a n index poly p1 p2) (princ "\n GET TOTAL LENGTH OFF ALL SELECTED LINES - October 2000 - Alan CULLEN") (setvar "CMDECHO" 0) (setq ssline (ssget '((0 . "LINE")))) (setq number (sslength ssline)) (setq total 0) (setq counter 0) (repeat number (setq name (ssname ssline counter)) (setq data (entget name)) (setq code10 (assoc 10 data)) (setq code11 (assoc 11 data)) (setq coord10 (cdr code10)) (setq coord11 (cdr code11)) (setq dist (distance coord10 coord11)) (setq total (+ total dist)) (setq counter (+ 1 counter)) ) (prompt (strcat "\n Total length of lines = "(rtos total) "........ No. of Lines = "(rtos number 2 0))) (princ) ) I cant understand which part of this code has to be copy and save....is it all text here... Quote Link to comment Share on other sites More sharing options...
prabhathjp Posted April 20, 2009 Share Posted April 20, 2009 dear allen... pl explain step by step lisp routing and QTYL command.....I don' know any thing on this command i m using 2007 and also need to know about data extraction wizard Quote Link to comment Share on other sites More sharing options...
Tiger Posted April 20, 2009 Share Posted April 20, 2009 You need to save the whole code. To get it to work, check out the link that Cad64 gave earlier in this thread, that explains how to load and run a Lisp-routine. For your questions about the data extraction wizard, please start a new thread and be more specific about what you want to know. 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.