autocad - auto lisp to retrieve project names from drawings -
i have client hard drive has crashed. able recover data in enumerated files, no dates, sizes or kind of naming scheme. these drawing files autocad, , there literally tens of thousands of these files. drawings have title blocks opening , renaming hand, take century. know of lisp can use open drawings , grab text title block? have tried myself have failed miserably.
if text require in same location based on absolute coordinates , possibly layer/text style/text height/etc., might still have chance.
you follow type of pattern:
- open document,
- zoom extents,
- select text entities given coordinates need search @ using bounding or crossing selection window,
- loop through returned selection set (possibly comparing contents of text string regular expression validation),
- extract value if it's located correctly,
- store current file name , extracted text value in csv, xml, xls file,
- close document,
- repeat.
this give complete list of documents current name , required name. after check duplicates, errors, or other issues, easy enough write function in excel vba (or language) rename each file required.
Comments
Post a Comment