The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Metadata or classes for imported sitemaps (http://forums.omnigroup.com/showthread.php?t=3267)

monkeycyclops 2007-04-09 01:06 PM

Metadata or classes for imported sitemaps
 
I'm making a template for sitemaps. Typically, my company's sitemaps start out either in OmniOutliner or just straight up XML. Is it possible to add some sort of metadata or class to items in Outliner or XML so that when I import into OG (and have it automatically render the sitemap), OG will assign specific shapes from my stencils to specific items. For instance, assigning a stencil with PDF icon in it to something I've flagged as a PDF.

I've been crawling through the OG documentation, and can't seem to figure out if this is possible. I would love if there is a way to automate this process, rather than having to do it manually. So far as I can tell, the only things OG recognizes on import are hierarchical relationships like parent to child, etc.

Joel 2007-04-10 11:02 AM

I'm fairly certain this is indeed possible, however you'll have to bear with me as it's probably going to require some hefty AppleScript to pull it off, and I am sadly not the sharpest tool in the shed when it comes to scripting.

Now the first obstacle is that the .graffle file format isn't the same as Outliner's, .graffle is really just a modified property list (we want to eventually move over to using strict XML for it in the future).

However, notes in OmniOutliner will translate properly into notes in OmniGraffle, so I'm suspecting that if you were to flag the entry as a particular file type, then you can run an AppleScript to change the graphic to whatever is desired after importing it into OmniGraffle.

That said, I should also point out that there's already user-defined metadata for graphics in OmniGraffle, it's just not exposed to the UI but one can use AppleScript once again to set that info, if it's any help.

monkeycyclops 2007-04-10 11:24 AM

Thanks Joel! I've never done anything with AppleScript myself, but I have a guy on staff who can probably whip something up.

One quick follow up: First, how do we access the notes for each object with AppleScript? AND, how would we loop through all those objects?

Joel 2007-04-10 12:01 PM

Notes can be set pretty simply in AppleScript, if you were creating a shape it would have the property of {notes:{text:"foobar"}, that sort of thing.

Looping is just basic if/then/else stuff.


All times are GMT -8. The time now is 02:19 PM.

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