Neelamegam Posted yesterday at 08:41 AM Posted yesterday at 08:41 AM 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 Quote
rbshsnkar Posted 22 hours ago Posted 22 hours ago 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. Quote
Neelamegam Posted 21 hours ago Author Posted 21 hours ago The table format is standard and never changes. Quote
CamDuy Posted 9 hours ago Posted 9 hours ago 15 hours ago, Neelamegam said: 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 736.06 kB · 6 downloads (TTE-TBE) Text to Excel-unformat_byCamDuy.lsp @Neelamegam try it! Quote
BIGAL Posted 44 minutes ago Posted 44 minutes ago (edited) A couple of comments, making a table is much easier than rows and columns of *text, one advantage is read all the string number of characters so set correct column width to max STRLEN. Part 2 is have Table to Excel program or just write direct to Excel. You provided a sample dwg but "I need an AutoLISP routine for Advance Steel 2023." so what are you trying to read from AS ? That makes more sense, export the desired answer without a intermediatory step. There is some code out there about reading AS object properties. Edited 43 minutes ago by BIGAL 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.