Lisp file sort issue

To all you lisp gurus out there: I have a lisp routine that is used to revise a block attribute globally over a list of drawings but lately when you get to the point of selecting the drawings to be edited the selection list comes out a jumbled mess - not in numerical order. Now this did not occur while the drawings were on my local drive but since moving everything to the network drive the sorting problem has appeared.

To test this I moved a group of files back to my local drive and the problem did not occur, the program worked fine. Bricscad and the lisp program are on my local drive, is that possibly the key? Any thoughts or comments would greatly appreciated.

Comments

  • How do you select the drawings?
  • Just like in your standard dialog box - browse option at the top. Pick a directory and a list of drawings shows up in one window. Click what drawings you need and press "add files" then your selection group shows up in the next window. From there you hit "run" and the program proceeds to edit the attribute. The glitch is when the list of drawings shows up it's not in the order as it would be in windows explorer - so you end up using the ctrl key a lot to select what you need.

  • This is obviously either a problem of the server's filesystem, and/or a problem of that file selection dialog;
    in case that the file selection dialog does not sort by itself (can you add a screenshot here ?), then it likely shows the files in that order, as the server returns the file list.

    What kind is the server, which OS, which filesystem is used there ?
    Besides, Lisp can sort a list of strings by (acad_strlsort) or (vl-sort), so why not always sort the selected file list by Lisp, to be independent ?

  • The server is a WD My Cloud running Win7 64bit. In regular windows explorer the directory in question shows the files in order. Attached is a shot showing the file listing on the dialog box, so you see the files all jumbled. On my local drive it doesn't do this - strange. Lee Mac is the author of the lisp (which I paid for) so don't know if attaching it would be opening up a can of worms, he's busy at the moment so figured I'd might get lucky & get a quick fix here.

    imagebatte-screenshot.png
  • If that code is Lisp and DCL (as Lee usually does), then I would still assume, that the Lisp code simply lists the files retrieved;
    even if server uses Windows, transfer between Windows machines is done by the Network component, and that network query might return a differently sorted list.

    So I think, the only safe solution would be that the Lisp code does its own sorting always ...
    likely up to Lee Mac to have a look at the code + to add sorting ...
  • Thanks Torsten! Until I get with Lee Mac I'll just move the group of desired files to my local drive and then run the lisp. Cheers!
This discussion has been closed.