In my code, there are two lines:
(vl-load-com)
...
(vl-file-size (getvar "dwgname"))
It works fine until today...
The 2nd line now returns a "nil" instead of a file size.
I now find that I have to rewrite the 2nd line to this:
(vl-file-size (strcat (getvar 'DwgPrefix) (getvar "dwgname")))
I test this code by using
1) the same drawing file,
2) same location,
3) same PC,
4) same AutoCAD version (Mech 2014)
And there is no setup changes on my pc or AutoCAD.
The only difference is the time, it works find yesterday, but today.
All my other codes are loaded and work perfectly.
Your helps are much appreciated.