reveal a group?

Is there a way to reveal a group in the current window with AppleScript?

Do you want to simply reveal the group’s icon in the window (that’s what reveal usually means), or do you want to view its contents in the window?

To display the contents of the group in the window:

tell application "DEVONthink Pro 
set theGroup to the incoming group of database 1
 set the root of viewer window 1 to theGroup
end

where “theGroup” is a reference to the group you want to display.

To just reveal the group:

tell application "DEVONthink Pro"
	set dumbo to the 1st viewer window
	set chumbo to dumbo's root
	set mumbo to child yourVariableHere of chumbo
	set dumbo's selection to {mumbo}
end tell

Thanks, I did mean reveal as “expand all ancestor groups and scroll the group list to make the selected group visible” (so your second one). I had tried essentially the same code that you suggested (including the curly braces because selection expects a list), but it didn’t work for me if all the ancestors were not already expanded.

I am doing this in Three Panes view. I understood that trying to do this in certain other views might not make sense.

It’s possible to set the selection of viewer windows (including scrolling if necessary) but it’s not (yet) possible to expand groups. Therefore the only workaround is probably GUI scripting.