jgvanir Posted August 12, 2009 Share Posted August 12, 2009 Hi all, I am using AutoCAD 2010 and need to know if there is a way to export (to excel or any other way) all the Handle "Id" numbers (see attachment) of all objects in a drawing. Or, Can I create a schedule in CAD with all the objects and their properties in a drawing and the export it to excel or other type of document? Thanks to all. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 12, 2009 Share Posted August 12, 2009 Well known author, columnist, instructor and programmer Bill Kramer outlined a Visual lisp routine that assembles an entity data list in his book The AutoCadet's Guide to Visual Lisp. It is depicted on page 177. Google "lisp"+"autocad"+"handle" (exactly as you see it here). Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 12, 2009 Share Posted August 12, 2009 jgvanir: Did you find what you were looking for? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 12, 2009 Share Posted August 12, 2009 Just a quick one (defun c:getHand (/ ss file) (vl-load-com) (if (and (setq ss (ssget)) (setq file (getfiled "Output File" "" "txt;csv" 9))) (progn (setq file (open file "a")) (mapcar (function (lambda (x) (write-line (cdr (assoc 5 x)) file))) (mapcar 'entget (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))))) (close file)) (princ "*Cancel*")) (princ)) Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 13, 2009 Share Posted August 13, 2009 This is what I was referring to. (DEFUN READ_DRAWING ( / EN) (SETQ EN (ENTNEXT)) ;get first drawing database entry (WHILE EN ;loop while EN has binding ; process entity name EN (SETQ EN (ENTNEXT EN)) ;get the next database entry ) ;end WHILE loop ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 13, 2009 Share Posted August 13, 2009 That will just loop through the entities in the database 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.