Autocad Extract Text Lisp
I am attempting to extract data from drawings given to me that do not have attributes assigned to certain text blocks. I do know the data I want will contain either 'MARK', 'ETCH', or 'STAMP'. I have tried entering (ssget '_X' '((0. 'ETCH*,MARK*,STAMP*'))) at the 'select objects' prompt which will select the text blocks I am looking for but when I run it with my lisp routine I get an error: '; error: bad argument type: stringp nil' I am however able to pick up the text I need with DATAEXTRACTION but I'm not sure if there's a way filter out text with value I do not care about.
I am still new to lisp and data extraction so bare with me lol Below is my current lisp routine which works for data that has attributes, what I did was replace the current ssget command with the one i mentioned above to get that error. (defun c:att-out (/ dn) (load 'attout') (setq dn (getvar 'dwgname')) (setq fna (strcat 'C:/Users/Allan/Desktop/LISP/dump/' dn '.txt')) (setq ss (ssget '((0. 'INSERT') (66. 1)))) (bns_attout fna ss) ) I have also thought of just using DATAEXTRACTION to grab everything and sorting it out in excel but it would be easier if I could avoid that.
Virtua striker gamecube. Any help to put me on the right track would be greatly appreciated. I apologize if i did not include everything you need here, just let me know if you need more information and I will be happy to supply it. Vladimir Michl. Galeb fp-550 program.
Here is a rare LISP routine. There are plenty of routines out there that take an exploded attribute and turn it into either text or mtext. So if you want a very fast way to extract data, this will save you a lot of time. About AutoCAD Tips. This blog serves as a knowledge base for myself (and anyone else).