Some questions, and a key difference between OGP5 and 6

Oh. Well, it looks like I can’t post an image here, bein’ a new user and all.

Poop.

So I’m recreating my database design stencils for OmniGraffle Pro 6, and some things have come up.

So, question 1: Is there a magnet editor yet? For example, I have a rounded rectangle that I’d like to drop 21 magnets along the top edge; currently, I have to make 21 separate squares, put N/S magnets on each one, group them together and then put a box over them to put text where I want it. It’d be nice to have the option of placing n magnets along specific edges.

Question 2: Is there any way to make drop shadows non-additive? When there are overlapping objects with drop shadows, there’s a darker spot where they overlap. Alternatively, it would be nice if I could create a group and apply a drop-shadow to the entire group.

Question 3: I note that tables from the supplied stencils no longer show anything but a hairline column delimiter border, and no vertical borders at all. Is that something I’m misunderstanding here, or is this a known problem?

1 Like

Okay, some more issues have cropped up. Again, I can’t upload an image yet for whatever reason, but here’s what I have:

  • 21 small boxes with rounded corners in a row, in a group, each with N/S magnets.
  • One more box with rounded corners overlapping that.
  • A table that overlaps that.

When I group those objects, the S magnets on those 21 boxes show through the box overlapping them, but worse, each row of the table appears to get its own drop shadow, which looks rather bizarre and is absolutely not like that when it’s not in a group.

Any way I can fix this?

Q1: I’m not sure I understand the question. You can use the magnet tool to drop magnets onto a shape wherever you want. They’ll stick to the edges. Make sure to check Magnets in the View menu to see what you’re doing. Unfortunately there’s no automatic way to make them equally spaced other than using the Custom Magnets pulldown in the Magnets inspector. It stops at 5 per side. (In OGP 6 the Magnets inspector has been moved to the Properties Inspectors tab. It’s icon is the one for the Action Inspector, so it’s not obvious that Magnets is in that one.)

Q2: I think you’re out of luck.

Q3: Which tables do you mean?

I should have said “21 evenly spaced magnets”, yes. I just wish that you could specify a number of magnets rather than just having a limited pulldown, and wish that you could select specific sides or segments. Perhaps AppleScript will let me do that.

So there’s no applying a drop-shadow to a group. Alas.

I did work out the table issue, fortunately; I’d pulled one out of the Font stencils, but the line widths wound up being inconsistent. Using Arrange > Make Table seems to work okay.

Applescript will in fact let you put equally-spaced magnets on a side. The following code is crude and has minimal error handling, but it seems to work.

Select a shape and then run the script. It will ask you to specify a side and then the number of magnets.

It doesn’t put magnets on the corners, but you can do that in the Connections inspector first if you want them there, too.

tell application id "com.omnigroup.OmniGraffle6"
tell front window
	if the selection is {} then
		display alert "Nothing Selected"
		return
	end if
	
	set selectedGraphics to the selection
	set theShape to item 1 of selectedGraphics
	set sideDialog to display dialog "Which side? N, E, S, W" default answer "N"
	if the button returned of sideDialog is "Cancel" then
		return
	end if
	
	set side to the text returned of sideDialog
	if side is not in {"N", "E", "S", "W"} then
		display alert "Express side as N, E, S, or W"
		return
	end if
	
	set magnetDialog to display dialog "How many magnets?" default answer "" buttons {"Cancel", "Add them"} default button "Add them"
	if the button returned of magnetDialog is "Cancel" then
		return
	end if
	
	try
		set magnetNumber to the text returned of magnetDialog as integer
	on error
		display alert "Number must be an integer"
		return
	end try
	
	set theSpacing to 1 / (magnetNumber + 1)
	set theMagnets to {}
	
	if side = "N" then
		repeat with theInterval from 1 to magnetNumber
			set theMagnets to theMagnets & {{-0.5+theInterval*theSpacing, -0.5}}
		end repeat
		
	else if side = "E" then
		repeat with theInterval from 1 to magnetNumber
			set theMagnets to theMagnets & {{0.5, -0.5+theInterval*theSpacing}}
		end repeat
		
	else if side = "S" then
		repeat with theInterval from 1 to magnetNumber
			set theMagnets to theMagnets & {{-0.5+theInterval*theSpacing, 0.5}}
		end repeat
		
	else if side = "W" then
		
		repeat with theInterval from 1 to magnetNumber
			set theMagnets to theMagnets & {{-0.5, -0.5+theInterval*theSpacing}}
		end repeat
	end if
	
	set the magnets of theShape to the magnets of theShape & theMagnets
end tell
end tell

Hmm, So I have been trying to get this to work but every time I run the script I get the following error:

OmniGraffle got an error: Can’t get selection of window 1.

I don’t have much experience using apple script so not sure if I am doing something simple incorrectly or not. Any thoughts? This script would be very helpful if I can it to work. Thanks.

johncocci, I can’t reproduce the error. How are you running the script? Could you please post an omnigraffle file that causes it to happen?