nod684 Posted February 23, 2023 Posted February 23, 2023 Best way is to convert those texts, numbers, etc to attribute then you can use data extraction to export the data to excel. Quote
devitg Posted February 23, 2023 Posted February 23, 2023 11 hours ago, Cecep said: Drawing1.xlsx 8.91 kB · 1 download Drawing1.dwg 84.04 kB · 2 downloads Please state about x and y coordinates , will it be the name insertion point? Quote
j2lstaples Posted February 23, 2023 Posted February 23, 2023 (edited) I asked this question a few days ago. I was creating a custom csv (comma-separated values) to use on Excel. Most of the time you can just use ATTOUT in the command line and select your blocks - which only works for blocks with attributes. What I had solved was to also include dynamic properties of custom blocks or anonymous blocks. I didn't include the handle and the anonymous block name but with a few tweaking it could act exactly like ATTOUT but extended to dynamic properties and any other entity properties you need from (entget). What I would do in your case is to create a function that create a selection boundary within each shape and then add each text to a list and then do a lot of lisp manipulation. What I expect is to compare (cdr (assoc 10 ent)) for each entity seen and then group close blocks together but this doesn't tell you what data they are to include in your table. This would be easier if each of those plots were blocks with attributes like nod684 mentioned which would make ATTOUT the tool of choice. Edited February 23, 2023 by j2lstaples Quote
BIGAL Posted February 23, 2023 Posted February 23, 2023 (edited) The way to go is use search for plines and get all text within, sort on Y value of text, then export to csv or excel direct. This question has been asked for many times before. Do a google "get text inside pline Autocad lisp" Hint (setq ss (ssget "WP" lstpts )) Hint2 is can get centroid of a pline. Edited February 23, 2023 by BIGAL Quote
devitg Posted February 24, 2023 Posted February 24, 2023 @CecepPlease give it a try. data to xls or csv.csv data to xls or csv.dwg DATA2CSV.lsp 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.