Janouren Posted April 11, 2022 Posted April 11, 2022 (edited) Good afternoon, we have started using data extraction tool EXTRDATA which has proven a great time saver, however, the table it outputs doesn't properly sort data, which is very frustrating. This needs to be sorted properly upon each extraction. Currently data sorts in this manner: A1 A10 A2 Desired sorting is this: A1 A2 A10 Picture: Users are placing a specific block into a drawing, which prompts them to type in attribute BOD, which is it's name that gets extracted along with it's x and y coordinates of insertion point. Due to the format of the name being a letter + number, autocad doesn't sort this properly. Exporting to excell, sorting it there and returning it back to AutoCAD is undesirable. LISP is not an option, because we are using AutoCAD LT for most of our workstations. I tried searching for a diesel expression to create a different attribute, which the extrdata would sort properly, but no luck so far. There might also be a way through generating a new data format, or using an existing one in a clever way. I wasn't able to find it though. Could anybody help us achieve this? Thank you and have a nice day. Edited April 11, 2022 by Janouren More accurate title Quote
BIGAL Posted April 12, 2022 Posted April 12, 2022 (edited) Have a look at this, the post by Pbejse should do what you want. Alphanumeric sort - Autodesk Community - AutoCAD https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/alphanumeric-sort/td-p/10622256?msclkid=34d69877ba0311eca068f3176e5eac8c Edited April 12, 2022 by BIGAL Quote
Janouren Posted April 13, 2022 Author Posted April 13, 2022 Hello, thank you for an answer! From what I understand, I'd have to define a list that will then be sorted, in other words, it's not universal. Is the list on line 1 manually defined? Thank you. source: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/alphanumeric-sort/m-p/10622391/highlight/true#M420450 Quote
BIGAL Posted April 14, 2022 Posted April 14, 2022 The only way to end up with a table sorted the way you want is to either sort all the data 1st before making table or read a table and totally recreate it in a sorted order. So yes need a list, dont panic lists can be huge in thousands of items. 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.