View Single Post
Running the following code will crash OmniGraffle 4. I get the same results in OmniGraffle 5. This was obtained using the Copy As Applescript command.
Code:
tell application "OmniGraffle Professional 4"
	tell canvas of front window
		make new shape at end of graphics with properties {origin:{166.0, 166.0}, size:{54.0, 36.0}}
		make new shape at end of graphics with properties {origin:{317.0, 171.0}, rank group:1, size:{54.0, 36.0}}
		make new shape at end of graphics with properties {origin:{83.0, 81.0}, rank group:1, size:{54.0, 36.0}}
		make new shape at end of graphics with properties {origin:{234.0, 86.0}, size:{54.0, 36.0}}
	end tell
end tell
I have tried a number of ways to set the "rank group" property, with no success. Any suggestions?

My goal is to organized a bunch of shapes to the same rank via scripting, in the same way that I would accomplish by selecting them in groups and clicking "Same" under "Object Rank" in the "Advanced Settings" of the "Canvas: Diagram Layout" inspector.

Last edited by timcoffman; 2009-06-14 at 07:01 AM.. Reason: Called "rank group" by the wrong name.