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

 
Script: Tree Tool - quick formatting and layout of OG hierarchy diagrams Thread Tools Search this Thread Display Modes
A recursive script, perhaps ?

The ninjas kindly offered to explore that particular rabbit hole in November.
Haven't heard from them since ...

:-)
 
Hi Rob,

I have been having a play and am impressed by your script. I guess that I have been influenced by some mind maps so I have been experimenting with curves and bezier connections between objects (boxes). I see that your script places a mid point on both curve types and was wondering how the position of this point is determined as it does not always result in a nice curve. The ideal would be to use bezier curves with the control handles positioned by code but I understand that this is not possible.

I have attached an example of a diagram with slightly odd curves where the diagram gets more complex.

Thanks again for all your hard work.

best wishes
Simon
Attached Files
File Type: zip Temp UK Services.graffle.zip (59.1 KB, 439 views)
 
The script itself doesn't add or position midpoints. If a section of your diagram has inadvertently acquired any during manual editing, you can:
  1. Select all
  2. In the line inspector, click 'Remove midpoints'

It may also be worth temporarily converting all lines to straight lines before converting them to curves again. Large row gaps (rank separations) may give you better-looking curves.

Good luck !
 
Having said which ... :-)

Although the script itself doesn't refer to mid-points, it does look as if Omnigraffle is creating unrequested mid-points when a shape with bezier or curve connections is moved by automatic layout or script. Particularly when the rank separation (generation gap) is small.

For the moment, using the inspector to remove midpoints is the obvious solution. Haven't been using bezier lines myself, so thank you for pointing this out – I'll take a closer look at it at some point.

--

Last edited by RobTrew; 2012-01-06 at 01:58 PM..
 
As automatic-layout moves of bezier-connected (or curve-connected) shapes can clearly engender unwanted mid-points (especially when the gap between rows is relatively small), in ver 0.143 I have added an rm (remove midpoints) command.



Thanks to Simon Knight for drawing my attention to this issue, which brings my current shopping list of bugs (in OG's built-in automatic layout) to five:
  1. Specified rank separations inconsistently applied,
  2. specified object separations inconsistently applied,
  3. ambiguities introduced by overlapping orthogonal connectors,
  4. spurious asymmetries introduced into symmetric outlines,
  5. and spurious mid-points introduced into bezier connectors.

At least 2 of these are secondary consequences of Graphviz's inability to centre parents over their child ranges.

--
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2012-01-06 at 12.22.30.png
Views:	909
Size:	30.1 KB
ID:	2200  

Last edited by RobTrew; 2012-01-06 at 01:53 PM.. Reason: Added ver 1.43 of script (restricts rm command to target scope)
 
Hi RobTrew, may i know if the script still works for the current version of OmniGraffle (5.3.6)? I tried but keep getting the "Only works with saved .graffle files" error. Thanks.
 
Quote:
Originally Posted by krycek View Post
Hi RobTrew, may i know if the script still works for the current version of OmniGraffle (5.3.6)? I tried but keep getting the "Only works with saved .graffle files" error. Thanks.
That's a precaution to make sure that you don't experiment with an un-saved file.

Use File > Save As to give your file a name.
I think you will then find that the script works.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script: Generate radial diagrams from outlines RobTrew OmniGraffle General 3 2012-09-03 11:26 AM
Odd behavior - line tool rearrances shapes? [A: template with auto-layout enabled was chosen] erickhill OmniPlan General 2 2012-06-27 02:02 PM
Script: clearer layout for orthogonal trees RobTrew OmniGraffle General 3 2011-10-31 01:10 PM
Script for formatting size based on incoming lines muntzing OmniGraffle General 7 2010-10-14 06:28 AM


All times are GMT -8. The time now is 02:20 AM.


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