RecipesExport to Excel and PDF

How do I export block insertion points to Excel from AutoCAD?

Type "give me a table of every TREE block with its X, Y and rotation". cadssistant reads the insertion point and rotation of each TREE reference and replies with a table; the Excel button on the table saves it as a CSV file through AutoCAD's save dialog, and Copy puts it on the clipboard as tab-separated text that pastes straight into a sheet. The palette never writes a file you didn't choose. The same export in AutoLISP is a loop writing lines to a file, shown below.

Checked 2026-10-30

What you typeCommand: CADSSISTANT

give me a table of every TREE block with its X, Y and rotation

Paste it into the palette, or pick it from the recipes inside the chat.

What cadssistant does

  1. Selects every INSERT named TREE and reads the insertion point and rotation of each in one AutoLISP pass.
  2. Replies with a markdown table. Every table in the chat carries Copy (tab-separated, for pasting into a sheet) and Excel (a CSV file that opens in columns in Excel).
  3. The Excel button opens AutoCAD's own save dialog, so the file lands where you choose; the palette never downloads anything by itself.

The same task in AutoLISP

(progn
  (setq ss (ssget "_X" '((0 . "INSERT") (2 . "TREE"))) i 0
        f (open "C:/temp/trees.csv" "w"))
  (write-line "handle,x,y,rotation_deg" f)
  (if ss
    (repeat (sslength ss)
      (setq ed (entget (ssname ss i)) i (1+ i) p (cdr (assoc 10 ed))
            ang (if (assoc 50 ed) (cdr (assoc 50 ed)) 0.0))
      (write-line (strcat (cdr (assoc 5 ed)) ","
                          (rtos (car p) 2 3) "," (rtos (cadr p) 2 3) ","
                          (rtos (* 180.0 (/ ang pi)) 2 1)) f)))
  (close f)
  (if ss (sslength ss) 0))

Writes C:/temp/trees.csv (the folder must exist). Group 50 is radians; the line converts to degrees.

Good to know

  • Coordinates are WCS, in drawing units. Say "in the current UCS" and it transforms them with trans.
  • Say "with the DESCRIPTION attribute" and the table gains a column read from each reference's attributes.

More in export to excel and pdf

Command: CADSSISTANT

Works in AutoCAD 2024 and newer on Windows. Free trial, no card, no API key.

Get cadssistant