The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Applescript import of dot files (http://forums.omnigroup.com/showthread.php?t=18567)

jpschorr 2010-10-15 05:51 AM

Applescript import of dot files
 
OmniGraffle v5.2.3...

I have a large number of graphviz dot files that I was hoping to script up batch importing, styling, then exporting for. Unfortunately, I'm both an applescript and omnigraffle noob, and can't seem to get the 'import' command to work.

[CODE]
tell application "OmniGraffle 5"
import (POSIX file "~/test.dot")
end tell
[/CODE]

fails with:

[CODE]
tell application "OmniGraffle 5"
import file "HD:Users:username:test.dot"
--> error number -1717
Result:
error "OmniGraffle 5 got an error: The handler some object is not defined." number -1717
[/CODE]

On the other hand, using the open command as below works, but pops up a dialog to select the layout type to use for dot import (which isn't super friendly for batch processing):

[CODE]
tell application "OmniGraffle 5"
open (POSIX file "~/test.dot")
end tell
[/CODE]

Thanks,
pschorr


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

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