Neelamegam Posted August 5 Posted August 5 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 August 5 Posted August 5 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 August 5 Author Posted August 5 The table format is standard and never changes. Quote
CamDuy Posted August 6 Posted August 6 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 August 6 Posted August 6 (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 August 6 by BIGAL 1 Quote
SLW210 Posted August 6 Posted August 6 Also, will this "Table" be the only thing in the drawing and just Text and Lines/Plines as per the example .dxf? And will this only be run on a .dxf? Speaking of... Quote I need an AutoLISP routine for Advance Steel 2023 Advanced Steel can export BOM/List direct to Excel IIRC. AutoCAD Mechanical can also export a BOM to Excel and comes free with the toolset. AutoCAD Mechanical 2024 Help | To Export a BOM (AutoCAD Mechanical Toolset) | Autodesk Solved: Excel lists from Advance Steel - Autodesk Community Advance Steel - Bill-Of-Material Creation 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.