View Single Post
This is over kill, but you can put them in programatically EXACTLY where you want them with applescript.

I made an annotation script and I needed to put three magnets on an side of an object. The position of magnet is figured out by a coordinate system where the center is 0,0

Here is an applescript that does the job, just edit one of the magnet lists to have the points you want the magnets.

Dan

---
Code:
-- select an objects to add magnets to in omnigraffle

-- these are examples lists of points for each edge of an object 
-- the two corners and the middle each get a magnet

set left_edge to {{-0.5, -0.5}, {-0.5, 0}, {-0.5, 0.5}}
set right_edge to {{0.5, -0.5}, {0.5, 0}, {0.5, 0.5}}
set bottom_edge to {{-0.5, 0.5}, {0, 0.5}, {0.5, 0.5}}
set top_edge to {{-0.5, -0.5}, {0, -0.5}, {0.5, -0.5}}

tell front window of application "OmniGraffle Professional"
	
	-- this will add magnets to all selected objects
	set objects to selection
	
	repeat with obj in objects
		set magnets of obj to left_edge
	end repeat
end tell

Last edited by Dan Thomsen; 2006-12-04 at 01:05 PM..