Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm creating a script file to get a file name (.tif) from a text file. Use that file name to insert the image into a dwg then save the dwg to the same name as the tiff file. No matter what I do I can't get the extension off the string.
(setq f (open "D:\\Project 1000\\Scanned Files\\Test Files\\TIF_file.txt" "r"))
(setq txtline (read-line f))
(close f)
;*****************************
; insert image works perfectly
-insert "D:\\Project 1000\\Scanned Files\\Test Files\\D12345.tif"
;*****************************
;Tried this, don't work
(setq Fname (substr !txtline 1 (- (strlen !txtline) 4)))
;Tried this, don't work either
(setq DWGname (strcat (!txtline ".tif")))
;End result desired
-save Fname
; or
-save DWGname
; or
-save "D:\\Project 1000\\Scanned Files\\Test Files\\D12345"
Thanks for any help!!
Solved! Go to Solution.