View Single Post
You can refer to oldCanvas directly, you don't need to look it up by index again. Like this:

tell application "OmniGraffle Professional"
	-- where were we?
	set theDocument to document of front window
	set oldCanvas to canvas of front window -- who's on first?
	-- do stuff
	set targetCanvas to canvas 2 of theDocument
	set canvas of front window to targetCanvas
	display dialog "Done doing stuff"
	-- put things back to how we found them...
	set canvas of front window to oldCanvas
end tell