Guest Gors100 Posted October 1, 2003 Posted October 1, 2003 Could someone please give any info whether it is possible to take dimensions from a simple engiineering drawing and place them in an Excell workbook, currently runnig CAD2000 Thanx Quote
fuccaro Posted October 2, 2003 Posted October 2, 2003 Hello Gordon! Yes, I think it is possible to export the dimensions in an Excel compatible format. I am thinking at a lisp routine to help you. But how to export them? Do you need just some dimensions, or all of them? or all dimensions placed on a layer? In what order: as you created them? sorted by value? as you select them? If they are overrided dimensions, do you need the real dimensions, or the overrided text? And how about the tolerances? Do you need them too? A lot of questions, but necessaires to write a program. Maybe here is an other way to do it? Quote
Guest Gors100 Posted October 2, 2003 Posted October 2, 2003 Thanx Fuccaro for viewng and posting reply I can see the problems of getting correct information in order. Dimensions would be real, tolerances not a problem my only thought for accomplishing this task is if object properties could be utilised. Did come across an attribute manager in CAD2002 that looked as if it could carry out this function do you know if this is correct. Thanx again Quote
fuccaro Posted October 3, 2003 Posted October 3, 2003 I have not understand how to select the dimension to export (sorry for my English), so I wrote a lisp to export all dimensions within a drawing. If it is not what you need, just return with an other message and I will try to help you. After you run the routine find a file "C:\drawingname.CSV". Auf course "drawingname" will be replaced in each case with the real name of the drawing. Open this file in Excel and save it in Excel format. Cheers! ;| Export all dimension from a drawing in a CSV file (Excel compatible) [email="mfuccaro@hotmail.com"]mfuccaro@hotmail.com[/email] October 2003|; (defun c:dex ; Dimension EXport ( / name file ent) (setq name (strcat "C:/" ; place here the desired path for the new file (if (= (strcase (substr (getvar "dwgname") (- (strlen (getvar "dwgname")) 3))) ".DWG") (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4)) (getvar "dwgname")) ".CSV") file (open name "w") ent (entnext)) (while ent (if (= (cdr (assoc 0 (entget ent))) "DIMENSION") (write-line (rtos (cdr (assoc 42 (entget ent))) 2 4) file)) (setq ent (entnext ent))) (close file) (princ) ) (princ "\nLoaded. Type DEX at the command prompt") (princ) Quote
fuccaro Posted January 2, 2011 Posted January 2, 2011 The code above, fixed: ;| Export all dimension from a drawing in a CSV file (Excel compatible) mfuccaro@hotmail.com October 2003|; (defun c:dex ; Dimension EXport ( / name file ent) (setq name (strcat "C:/" ; place here the desired path for the new file (if (= (strcase (substr (getvar "dwgname") (- (strlen (getvar "dwgname")) 3))) ".DWG") (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4)) (getvar "dwgname")) ".CSV") file (open name "w") ent (entnext)) (while ent (if (= (cdr (assoc 0 (entget ent))) "DIMENSION") (write-line (rtos (cdr (assoc 42 (entget ent))) 2 4) file)) (setq ent (entnext ent))) (close file) (princ) ) (princ "\nLoaded. Type DEX at the command prompt") (princ) Quote
minhphuong_humg Posted November 30, 2013 Posted November 30, 2013 The code above, fixed:;| Export all dimension from a drawing in a CSV file (Excel compatible) mfuccaro@hotmail.com October 2003|; (defun c:dex ; Dimension EXport ( / name file ent) (setq name (strcat "C:/" ; place here the desired path for the new file (if (= (strcase (substr (getvar "dwgname") (- (strlen (getvar "dwgname")) 3))) ".DWG") (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4)) (getvar "dwgname")) ".CSV") file (open name "w") ent (entnext)) (while ent (if (= (cdr (assoc 0 (entget ent))) "DIMENSION") (write-line (rtos (cdr (assoc 42 (entget ent))) 2 4) file)) (setq ent (entnext ent))) (close file) (princ) ) (princ "\nLoaded. Type DEX at the command prompt") (princ) Dir, fuccaro! I'm trying your lisp for my drawing. But don't run. Please, review your lisp help me. I want ouput all value dimension in my drawing (can select each dimension or select all dimensions). Please, help me. Thank you very much. File attach: Help.dwg Quote
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.