Jump to content

Need AutoLISP to Export TEXT/MTEXT to Excel (Advance Steel 2023)


Recommended Posts

Posted

Hi everyone,

 

I need an AutoLISP routine for Advance Steel 2023.

 

Requirements:

 

- Read all TEXT and MTEXT.
- All my drawings have the same format.
- Preserve the table layout exactly as shown in the drawing.
- Export to CSV or Excel.
- Columns are:
  1. Name of Assemblies
  2. Drawing No.
  3. Qty
  4. Total Weight

 

Sample DXF is attached.

 

Any help would be greatly appreciated.

1111 1.dxf

Posted

If your table layout is always the same, you don't need a very complicated AutoLISP.

A simple approach is:

* Read all TEXT and MTEXT entities.

* Sort them by Y coordinate (rows) and then X coordinate (columns).

* Group nearby text into the same row using a small Y tolerance.

* Map the four columns to Assembly Name, Drawing No., Qty, and Total Weight.

* Write the data to a CSV file (Excel opens CSV directly).

The biggest challenge isn't exporting—it's correctly identifying which text belongs to each row. Once the row grouping is reliable, CSV export is straightforward.

If you can share the sample DXF, someone can write a routine tailored to that table format, making it much more reliable than a generic text export.

Posted

The table format is standard and never changes.

Posted

Why don't use have it as a Table Object in AutoCAD?

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...