TimG Posted April 18, 2016 Share Posted April 18, 2016 I have been having problems loading a lisp that has previously worked, without a problem for years, but now throws a message "Error: bad argument value: string position out of range 17". The lisp is loaded on opening of each drawing in the acaddoc.lsp, which has not changed. It is supposed to open a csv and update blocks. From what I can tell, it seems as though AutoCAD cant find the csv file in the Working Directory. (When opening a drawing with the lisp loaded in acaddoc.lsp specifying the name via findfile "name.csv") When I load the lisp through APPLOAD and manually select the file, via getfiled, it works. (findfile Nil) The Name of the csv has not changed in the acaddoc.lsp and the file is definitely in the same folder as the opened drawing. So my questions are, Is there any Variable in AutoCAD (Map 3d 2016) that could have changed to cause this? Is it a bug? Are there methods of finding the specified file in the same directory, (as the opened drawing), other than findfile? vla-get-FoundPath perhaps? How can I debug using VLISP? I tried (VL-BT) and get this; Backtrace: [0.19] (VL-BT) [1.15] (#) [2.12] (# "(vl-bt)" T #) :CALLBACK-ENTRY.6 (:CALLBACK-ENTRY) :ARQ-SUBR-CALLBACK.3 (nil 0) nil I'm not sure what it means? It's the first time I've used VLISP and only have a basic knowledge of VBA through a TAFE course, which was really more about VBS. At this stage I'm not sure if its a setting or AutoCAD is not looking in the right place? I have tried resetting autocad to default which didn't work, then I reinstalled autocad, which also didn't work. Then I updated to windows 10 just to see if some setting was changed or broken. None of those steps worked. I had been playing around with excel,( and had improved the spreadsheet which output the csv to also put out a xlsx, for a Data Link), in the previous weeks, which gave me the possibility that I had unwittingly changed a setting somewhere. The excel spreadsheet had worked with the lisp for at least 2 weeks before the error started to occur. One other thing to mention is that when excel is trying to save the csv and autocad is reading it,( has it open maybe? through the manual loading of it through the lisp), it comes up with an error 1004 or something. This happened to a co-worker who tried to debug it, and we tried alternate ways of saving the csv. After that moment the problems started. We tried the original untouched excel spreadsheet, acaddoc.lsp and method like we always had done, but now the error always occurs. Please, are there any suggestions? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.