- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
I am trying to write a lisp function that looks at a file address and changes the address from a 'drive:user\username\folder1\subfolder2' format to 'drive:user/username/folder1/subfolder2' format.
My end goal is to have a set of functions that locate a properties file, reads the information to confirm proper formatting, then prompt the user for new information to write to the properties file. I have everything mostly written and working so far, and am starting to integrate them together. The snag I've run into is the findfile function outputs the location in a string in a 'drive:user\username\folder1\subfolder2' format. To open a file I need the string formatted like 'drive:user/username/folder1/subfolder2'
I wrote a function to go thru a string and identify instances of '\', but it appears to never exit my while loop. I am assuming that strings in lisp end in a nul character like in other languages, I am using nil for my exit comparison in this case. I am hoping someone can look at what I've got and tell me what I'm doing wrong, or if I am fundamentally not understanding how strings work in LSP.
Thanks in advanced,
JD
Reference I am using for findfile: https://help.autodesk.com/view/OARX/2018/CHS/?guid=GUID-D671F67D-F92B-41FF-B9FA-A48EF52CF607
Note: it says in this reference that the string returned is suitable for the open function, but that is not the case as of writing this post.
Solved! Go to Solution.