The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Arrowheads at each directional change with lines Thread Tools Search this Thread Display Modes
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.
 
Quote:
Originally Posted by Kitesurfa View Post
arrowheads at each change of direction of a flow line
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
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2012-05-11 at 12.48.37.png
Views:	187
Size:	8.5 KB
ID:	2383   Click image for larger version

Name:	Screen Shot 2012-05-11 at 12.48.49.png
Views:	202
Size:	8.7 KB
ID:	2384  

Last edited by RobTrew; 2012-05-11 at 04:31 AM.. Reason: draft 0.2 connects arrowed segments to each other
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
double headed arrows/line with two arrowheads richardswancott OmniGraffle General 1 2012-08-22 12:14 AM
Manipulating Arrowheads PMulvey OmniGraffle General 1 2011-08-03 10:25 AM
Tables with Horizontal Lines (but not Vertical Lines)? lanceosborne OmniGraffle General 6 2010-11-11 01:40 AM
Newbie: Lines with arrowheads on both ends bruegel OmniGraffle General 2 2007-08-29 02:45 AM
connecting lines to lines juliabell OmniGraffle General 9 2006-08-12 04:31 AM


All times are GMT -8. The time now is 12:40 AM.


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