After using the FMT command over the last month or so (see this previous post), I became annoyed by the fact that, when trying to check multiple files in the same folder, I had to navigate to that folder from “My Documents” each time. The AutoLISP getfiled function can be told to start in a specific folder; my original code was written quickly and was initially more of a proof-of-concept effort. Actual use exposed the problem with using the default starting folder. So I made a few modifications to the code, including establishing a global variable (one that does not lose its value after a run of the program), sFmtPath, to hold the directory path of the file selected on the previous use of FMT.
I added an if statement at the very beginning of the code to test to see if the value of sFmtPath is either nil or is not a string. If either of those conditions is true, the value is reset to an empty string [“”]. If neither is true, the string value is left as is. This string value…
Read more