Jump to content

Spreadsheet


Guest Gors100

Recommended Posts

Guest Gors100

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Guest Gors100

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

  • 7 years later...

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)

Link to comment
Share on other sites

  • 2 years later...
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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...