I am seeing this work in OmniGraffle 7.8 with this test document: RealignUs.graffle (5.9 KB)
Here’s a working example that swaps the text alignment from left to right (and back again). There is a bug where it doesn’t appear on canvas that the alignment has been updated, which is a redraw problem, but once you select the shape you will see the alignment update on canvas. As a workaround to the redraw problem, you can select all and then deselect, or you can save the document, close and then reopen to make sure everything refreshes. The redraw issue has been reported to the team.
-- Toggle all shapes in the front canvas between left and right aligned text
tell application "OmniGraffle"
tell front canvas of front document
set refRuns to a reference to attribute runs of text of shapes
set lstAlign to alignment of refRuns
if first item of lstAlign = {left} then
set alignment of refRuns to right
else
set alignment of refRuns to left
end if
alignment of refRuns
end tell
end tell