I'm using the code below to change (via script) the Sort Order of the Assets inside my Library. After the script finish I have no erro messages but nothing happens...the order on the Library Panel still the same. Any suggestion?
I'm testing with an empty document (1 page) and an open Library with some assets.
var myDocument = app.activeDocument;
var myLibrary = app.libraries.itemByName("LibraryName.indl");
var myLibraryPanel = myLibrary.associatedPanel;
does nothing. You probably meant
myLibraryPanel.sortOrder = SortAssets.BY_TYPE;
Now it's working fine.