- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, all.
Assume a csv or text file, with multiple lines of text, and contents organized like a table (but simply separated by commas or tabs), like the sample attached.
Is there a way to create a lisp routine which will read that table file, find the line starting with a text that matches the filename of the AutoCAD file in which the lisp routine is being ran, then on that line read/store the next token, and do something, then read/store the third token, and then do something else, and so on?
From the attached example, if we are working in E221.dwg, the routine would find the line which starts with "E221", then read the next token in that line, "79", then do something, then read the next token in that same line, "16053973", then do something else, then (in this case) stop.
For a specific example, every so often near the end of projects, I need to go into each dwg sheet file and add/update the individual sheet number and one other number which is also different per sheet. Very time consuming for some projects...
Thankfully, I have already learned how to write content to a text attribute in a block (here) - just need to learn how to read now š
Any help or guidance would be appreciated!
Edgar
Solved! Go to Solution.