The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Arrowheads at each directional change with lines (http://forums.omnigroup.com/showthread.php?t=24170)

Kitesurfa 2012-05-11 02:25 AM

Arrowheads at each directional change with lines
 
Looking for a quick pointer.

I'm using OG to do process flow diagrams, best practice requires arrowheads at each change of direction of a flow line, as well as at the end.

Visio allows this functionality to be toggled for orthogonal line types.

OG has orthogonal line types, but I cannot find how to; either toggle multiple arrowheads (greater than 2) on/off, or an OG specific work around.

Any suggestions would be greatly appreciated.

RobTrew 2012-05-11 03:55 AM

2 Attachment(s)
[QUOTE=Kitesurfa;110292]arrowheads at each change of direction of a flow line[/QUOTE]

You can run a script to replace the currently selected multi-segment straight lines(s) with a series of connected single lines which inherit the head and or tail arrows.

(Unfortunately, this doesn't work with OG orthogonal lines, as the Applescript interface only exposes their start and end points – it doesn't reveal their turning points).

[CODE]-- draft 0.2 connects segments to each other

tell application id "OGfl"
set oWin to front window
set lstSeln to selection of oWin
if length of lstSeln < 1 then return
tell canvas of oWin
repeat with oLine in lstSeln
if class of oLine is line and line type of oLine is straight then

set lstFrom to missing value
set oLastSegt to missing value
-- REPLACE EACH SEGMENT WITH A LINE THAT HAS THE SAME HEAD AND/OR TAIL ARROW(S)

repeat with oPoint in points of oLine
set lstTo to contents of oPoint
if lstFrom is not missing value then
duplicate oLine to end of graphics
tell (item -1 of graphics)
set point list to {lstFrom, lstTo}
if oLastSegt is not missing value then set destination of oLastSegt to it

set oLastSegt to it
end tell
end if
set lstFrom to lstTo
end repeat

-- DELETES ORIGINAL LINE
delete oLine

end if
end repeat
end tell
end tell
[/CODE]


All times are GMT -8. The time now is 08:00 PM.

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