How to import Visio into Omnigraffle on the iPad

On of the Apps which I use on a regular basis on the iPad is Omnigraffle. Although it is by far the most expensive App I have bought so far, it is well worth the money.

But there is one major feature missing at the moment: You can not (yet) import Visio drawings directly on the iPad. Until this feature is added, I have decided to create myself a little work-around using Omnigraffle on my Mac at home and Dropbox, combined with a bit of AppleScript magic.

Here is how my workflow works at the moment: I have a Folder setup within my Dropbox which is monitored by an short little AppleScript. Once a new document appears in that folder, and it is a Visio file, the script is launching Omnigraffle, opens the Visio drawing and saves it as an Omnigraffle file back into the folder.

This means that within a minute or so, I can access the converted file from Dropbox on the iPad and open it directly with Omnigraffle on the iPad.

This works fine when I have the Visio drawing on a machine where I can save it to that Dropbox folder. Unfortunatly, this is something you can’t do on the iPad, meaning I still need a solution to access/convert Visio drawings when on the road, and only having the iPad with me.

Well, once again, AppleScript comes to the rescue. I keep the Mail App running on my Mac at home, monitoring incoming Emails for attachments using a bit of Applescript. If the attachment contains a Visio document it saves the document into the above mentionned folder on my Dropbox, and from there it continues as above. Meaning it will get converted into an OmniGraffle document and saved back into teh folder.

With this setup, I can basically open any Visio drawing within a couple of minutes from the iPad. If I received it by Email, it will get converted anyway. If I receive it from any other place, i.e download from a website, I can simply download the Visio drawing and Email it to my monitored Email account, and access the converted file within minutes through my Dropbox.

If there is interest, I will publish the necessary AppleScript code here.

This entry was posted in iPad and tagged , , , . Bookmark the permalink.

17 Responses to How to import Visio into Omnigraffle on the iPad

  1. Matthias says:

    I would really appreciate the script for this work-around…

    Thanks.

  2. Jim says:

    I am very interested

  3. simon says:

    I’m definitely interested, just got an iPad (I’m in Oz) and need to deal with visio diagrams. Already have omnigraffle on a macbook, missing the iPad integration.

    If you can post the scripts you’ve built I’d greatly appreciate it.
    Thanks, Simon.

  4. Ajay Bidani says:

    I am trying to incorporate my iPad into my workflow for creating process flowcharts and the whatnot. A script like this sure would help me out at work I am forced to use a Windows PC. I have a proxy set up to sync my dropbox folder, so your first script sounds awesome.

  5. Thanks, some useful info was here.

  6. Eugene says:

    Thanks for the advice Mike. i would be grateful to see the applescript code.
    thanks Eugene

  7. Danny Joe says:

    Would really like the script also. Thank you

  8. Graham says:

    Would really like the script thanks! Cheers

  9. Joseph Kiddell says:

    Mike,

    This is a great idea. I am loving Omnigraffle, but struggle with my office always wanting to run everything as Visio.

    It would be great to see the script you are using. I am new to Automator and while I can follow the structure, I have not been able to work out how you open new files arriving in dropbox folder and know how to then move file to the trash when the omnigraffle conversion has completed. However I have been able to work out how to script anything in Omnigraffle. I have tried the record function but on replay the context does not seem to ever move correctly to the Omnigraffle window.

    I can obviously do all of this by hand but automator has got the better of me. What am I doing wrong? once I have know I will then create a reverse dropbox function so I can email from the IPad and have an automator conversion back to Visio to share with colleagues.

  10. Mike says:

    Hi – nice stuff – question, how do you open your .graffle file from Dropbox on the iPad – this is currently stumping me. Thanks in advance

  11. Ricardo says:

    Can you please send me the applescripts you use to accomplish the automatic and mail conversion? Thanks in advance.

    -Ricardo

  12. Joseph Kiddell says:

    Mike,

    Sorry for the extremely slow reply.

    Dropbox “open in” function recognises the file type of graffle so gives me the option to open in Omnigraffle.

    I also noticed a mistake in my original post

    “However I have been able to work out how to script anything in Omnigraffle.”

    should have read –

    “However I have NOT been able to work out how to script anything in Omnigraffle.”

    I have tried altering and combining a couple of scripts from:

    http://forums.omnigroup.com/showthread.php?t=8276

    http://forums.omnigroup.com/showthread.php?t=106

    This has allowed me to identify when a new file arrives and open it in Omingraffle. unfortunately from this point forward I am stuck i have tried to create an Applescript through the record function to then resave the file in the dropbox directory on my MAC (it automatically saves in graffle format) but the script always falls over. It seems that when a Visio file is opened in Omnigraffle the file name is lost (becoming “Untitled”). and this seems to be why it falls over. Script used below;

    — Here is an AppleScript that will watch a folder for changes to Graffle files and automatically convert them to another format. Before use you should:
    — 1. Change the properties at the beginning to match the behavior you would like as far as where to watch and what type to export as.
    — 2. Towards the bottom there is a “here is where you set the export settings” section where you can do the AppleScript equivalent of setting various controls on Graffle’s export panel. You may want to change the export settings here. See Graffle’s AppleScript dictionary for details on the setting names, and et cetera.
    — 3. Finally, you may also need to change the application name from “OmniGraffle Professional” to just “OmniGraffle” in process_item if you have the standard version instead of pro.
    — Then just run the script. It will keep running forever until you manually stop it. You could set it up as a startup item if desired.

    — a file extension which Graffle supports for export
    property new_extension : “graffle”
    — the folder to watch
    property watch_folder : “MAC HD:Users:Home:Dropbox:To MAC OG”
    — the subfolder inside the watch folder where the exported documents should go
    property export_foldername : “To Ipad OG”
    — amount of time to wait in between checking for file changes
    property seconds_between_checks : 30

    tell application “Finder”
    — set up the watch folder and create the export folder inside
    tell application “Finder”
    set watch_folder to watch_folder as alias
    if not (exists folder export_foldername of watch_folder) then
    make new folder at watch_folder with properties {name:export_foldername}
    end if
    set the export_folder to (folder export_foldername of watch_folder) as alias
    end tell

    — repeat forever
    repeat
    — get all the graffle files in the watch folder
    set fileList to files of watch_folder whose kind is “Visio® document”
    repeat with aFile in fileList
    — figure out what the new exported name would be
    set new_name to my rename(aFile, new_extension)
    set the target_path to (((export_folder as string) & new_name) as string)

    — if there isn’t an export file or if the graffle file is newer, do the export
    if (not (exists document file new_name of export_folder)) or modification date of aFile > modification date of document file new_name of export_folder then
    my process_item(aFile as alias, new_name, export_folder)
    end if
    end repeat

    — wait before we look again
    delay seconds_between_checks
    end repeat
    end tell

    — this sub-routine just comes up with the new name
    on rename(this_item, new_extension)
    tell application “Finder”
    set the file_name to the name of this_item
    set file_extension to the name extension of this_item
    if the file_extension is “” then
    set the trimmed_name to the file_name
    else
    set the trimmed_name to text 1 thru -((length of file_extension) + 2) of the file_name
    end if
    set target_name to (the trimmed_name & “.” & new_extension) as string
    end tell
    return the target_name
    end rename

    — this sub-routine does the export
    on process_item(source_file, new_name, results_folder)
    set the source_item to the POSIX path of the source_file
    set the target_path to (((results_folder as string) & new_name) as string)
    with timeout of 900 seconds
    tell application “OmniGraffle Professional 5”
    — save the current export settings so we can replace them later
    set oldAreaType to area type of current export settings
    set oldBorder to include border of current export settings

    — here is where you set the export settings you want
    set area type of current export settings to all graphics
    set include border of current export settings to true

    — open the file if it isn’t already open
    –set needToOpen to (count (documents whose path is source_item)) is 0
    –if needToOpen then
    — open source_file
    –end if

    — do the export
    set docsWithPath to documents whose path is source_item
    set theDoc to first item of docsWithPath
    save theDoc in file target_path

    — if the file wasn’t already open, close it again
    if needToOpen then
    close theDoc
    end if

    — put the original export settings back
    set area type of current export settings to oldAreaType
    set include border of current export settings to oldBorder
    end tell
    end timeout
    end process_item

  13. Hi, Thanks for this post. It claims to indicate a solution
    the issue I’m having transferring Omnigraffle to iPad and back. I’m
    a bit stumped as to how you’re getting the Open In option to show
    up in Dropbox for the iPad. For me, all I ever get is Dropbox
    expanding the graffle document as an archive and the ability to
    view the internal contents. Any secret how you’ve avoided this
    behavior and allowed opening in Omnigraffle would be most
    appreciated! 🙂 Cheers, ast

  14. Pingback: Visio Dateien mit Ipad3 lesen und bearbeiten

  15. Brandon says:

    I would also like to know how to open a .graffle file from dropbox. Did they change this function in the DB app?

  16. Henry Adams says:

    There is Visio Viewer for iPad/iPhone –
    http://itunes.apple.com/us/app/vsd-viewer/id538386564?ls=1&mt=8

  17. Jonathan Johnson says:

    It doesn’t look like Omni has fixed this issue yet, have
    they? I have struggled with this for a while and have finally
    started looking for alternatives. Is anyone familiar with
    Lucidchart? I’ve read some good reviews and it claims to have full
    Visio and iPad support. It’s free
    anyway so will probably give it a shot.

Leave a Reply

Your email address will not be published. Required fields are marked *