3

I'm using ArcMap 9.3.

Shift the rows order display (ascending/descending) for a given field is as simple as double clicking on the screen.

However I'd like to know how to perform this simple operation through automation, in my case, using VBA code.

I've done searches over several interfaces such as ITableDefinition, ITableSort, IIndex with no success. ITableSort does exactly this but I did not find out an interface to pass its arguments to IDisplayTable.

Can someone help me find the parameters to pass?

1

I believe the Interface ITableSort does not actually sort the table, it returns lists or cursors of sorted data, which is subtly different.

This has been discussed as far back as 2007 as shown in these ESRI forum threads:

http://forums.esri.com/Thread.asp?c=93&f=993&t=212789

http://forums.esri.com/Thread.asp?c=93&f=988&t=238000

One suggestion is you reconstruct a table of your sorted data. If that is a solution and you have an Advanced license level, you are better off calling the geo-processing tool Sort.

The ArcMap GUI is doing something clever which I cannot see how you would hook into and refresh. If anyone does know how to do it, it would be great to see as I've never been able to work how to refresh the display of a sorted table!

  • I think reconstruct the whole table for showing purposes doesn't pay. Anyway, thanks a lot for your prompt response Hornbydd. – Cesar Vasini Aug 12 '15 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.