The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Connector Shapes - how are they created (http://forums.omnigroup.com/showthread.php?t=14222)

Simon Knight 2009-10-21 02:05 PM

Connector Shapes - how are they created
 
In a fit of peak I read part of the manual and noticed that connection shapes were new in OG version 5 and stored in a connections stencil. I am wondering if it is it possible to create/design my own connection shapes and if so how?

Simon

Simon Knight 2009-10-22 06:14 AM

1 Attachment(s)
I have not been able to create a connecting shape from scratch but it is possible to modify a shape from the connections stencil. I modified the lightning bolt into a curved arrow.

Simon

cyleigh 2011-01-31 06:23 PM

Is there another way to create a custom connecting shape? It would be very useful for me...

john.gersh 2011-02-01 05:17 AM

There's a mildly complicated way to make custom connecting shapes:

Draw the shape you'd like using whatever method is appropriate: use the pen tool, modify an existing shape, do shape editing...

Select the shape and do Copy As > Applescript.

Open the Applescript Editor and paste in the script.

The script should begin, for example:
"tell application "OmniGraffle Professional 5"
tell canvas of front window
make new shape ...."

Add the word "connectable" between "new" and "shape:"
"tell application "OmniGraffle Professional 5"
tell canvas of front window
make new connectable shape ...."

Run the script to produce the new connecting shape. It will appear right under the shape you copied; you'll have to move that one out of the way. (Alternatively, delete the original before running the script.) The new shape will have red and green connecting points just like other connecting shapes. As far as I can tell, those connecting points appear in the middle of the left and right sides of the shape's bounding box, so you might want to take that into account in drawing the shape.

Simon Knight 2011-02-02 07:45 AM

John,

Great tip, thanks.

Simon

ispeak 2011-02-03 08:11 PM

Thanks for sharing the tip.

john.gersh 2011-02-04 12:07 PM

You're welcome. OG's extensive scripting capability and the copy-as-applescript feature are extremely powerful. You can find out how all kinds of things are built under the hood and tinker away. In this case, I just copied-as-script an existing connector shape, saw the word "connectable," and went on from there.

cyleigh 2011-02-06 02:14 PM

Thank you! Very useful :)


All times are GMT -8. The time now is 07:13 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.