Search String Lisp

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys!
Please help me with a small issue.
Is there any free .lsp that can search a specific string in a drawing and then use it in a formula? 🤔
Let me explain further. I have lots of dxf files, all of them having the following text string “TOTAL LENGTH:XXX” (XXX is variable). I need to enter every file and dimension some specific 2D objects with various lengths. I made the following lisp in which I set a dimension style as per my needs, but the dimension text height should be updated for every file at a time.
(defun c:dsq()(command "dimclrt" "7" "" )(command "dimasz" "1" "" )(command "dimtxt" "1" "" )(command "dimclrd" "1" "" )(command "dimclre" "1" "" )(command "dimscale" "1" "" )(command "dimdec" "0" "" )(command "dimtvp" "0.7" "" )(command "dimtih" "OFF" "" )(command "dimtoh" "OFF" "" )(command "dimexo" "0" "" )(command "dimexe" "0.8" "" )(command "dimcen" "2" "" )(command "dimtofl" "ON" "" )(command "dimtfill" "0" "" )(princ))
So i want that XXX to be included at dimasz/dimtxt and then set dimension text height => length value / 40 (this is an acceptable factor for any length).
Any hints will be highly apreciated!