aglasier
28.05.2018, 21:06
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 . "TEXT,MTEXT")(1 . "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 lolBelow 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. 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.
(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. 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.