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?

Hornbydd
44.9k5 gold badges42 silver badges84 bronze badges
asked Aug 10, 2015 at 22:39

1 Answer 1

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!

answered Aug 11, 2015 at 13:09
1
  • I think reconstruct the whole table for showing purposes doesn't pay. Anyway, thanks a lot for your prompt response Hornbydd. Commented Aug 12, 2015 at 21:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.