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 > OmniGraphSketcher > OmniGraphSketcher General
FAQ Members List Calendar Today's Posts

 
.ograph file format Thread Tools Search this Thread Display Modes
I would like to set up export of data from another piece of software into a prototype .ograph that could then if necessary be worked up in OmniGraphSketcher. I have figured out that the .ograph is a zip archive, and can understand contents.xml, but I wonder if there is some documentation that would enable me to construct contents.xml from scratch - in particular, which parts of the xml tree are essential, ie would not be filled in with sensible defaults by OmniGraphSketcher. Is there a documented schema or anything else written that might be available?

Thanks for any advice!
 
Hi,

The first thing to note is that if your goal is to import data into a lot of similar graphs, usually the best option is to first save out a blank template file with your preferred styles, and then use OmniGraphSketcher to copy/paste the data into duplicates of the template. However, I do realize there are limitations with this approach, in particular that it is not amenable to setting up batch jobs for creating large numbers of graphs.

So... the next option is making your own XML files. This comes with the usual disclaimer that the XML format could change in future versions of OmniGraphSketcher and "your mileage may vary." But we did choose an XML file format so that you would have this option.

Your best bet for a "template" is still going to be a blank graph file with your preferred styles applied. Save the template, change the extension to .zip, unzip and find the contents.xml inside the zip archive. Copy that XML file into a new location and rename it to have a .ograph extension; OmniGraphSketcher will be able to read it directly (saving you zipping/unzipping hassles as you experiment).

The schema for our XML format is documented in detail as RelaxNG. (See relaxng.org for more info about RNG and how to validate your XML files.) To find the .ograph schema, right-click on the OmniGraphSketcher app, choose "Show Package Contents", then navigate to Contents -> Resources -> GraphSketcher.rng . Almost all attributes have defaults, and most of these are documented in the RelaxNG file.

What you will most likely want to do is leave the entire template xml file intact, and insert your own graph elements at the end, just before:

</graph>
</document>

The main limitation you will probably run into is that automatic axis scaling doesn't work. That is, the axis ranges and some of the tick labels have to be specified exactly in the XML file. Your best bet is probably to leave the axis ranges and tick labels as-is in your sample file. Then, after finishing your XML processing, you can open the resulting file in OmniGraphSketcher and just choose Arrange -> Scale to Fit Data.

Hope this helps! Let me know if anything needs clarification.
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
File format Atlanta OmniOutliner 4 for Mac 5 2013-10-02 01:10 PM
OF File Format Documentation? sprugman OmniFocus Extras 1 2010-03-23 08:24 AM
File format thesk OmniFocus Syncing 0 2008-08-04 01:17 PM
NSB File format support ZTZ OmniWeb General 4 2007-09-10 07:11 AM
ODF as a native file format? chs Omni Lounge 4 2007-05-23 01:22 PM


All times are GMT -8. The time now is 03:48 PM.


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