The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   How do I change the font in every page of a multi-page doc? (Applescript?) (http://forums.omnigroup.com/showthread.php?t=8279)

Andrew N 2008-06-23 10:20 AM

How do I change the font in every page of a multi-page doc? (Applescript?)
 
I have an 80 page document which was opened on another machine without the original font installed and consequently I have to change the font back throughout the document.

How do I do this?

Thinking about applescript... but my applescript skills aren't good enough.

I can't work out how to "select all" on the page and change the font. This is where I got to, but can't work out anything else.

tell application "OmniGraffle Professional 5"
set theDocument to front document
set canvasCount to count of canvases of theDocument

repeat with canvasNumber from 1 to canvasCount
set canvas of front window to canvas canvasNumber of theDocument
select all
set font to "bentonsansf"
end repeat
end tell

Thanks in advance!

Andrew

Andrew N 2008-07-10 06:53 AM

-Bump?-

Brian 2008-07-10 09:07 AM

Andrew, I'd send in an email about this, as well. (See my response in your other thread.)

Wim Lewis 2008-07-10 12:30 PM

Just dashing off a quick reply here, but you should be able to do something along the lines of

[code]tell application "OmniGraffle Professional 5"
tell document "Some Document"
repeat with ACanvas in every canvas
repeat with AGraphic in every solid of ACanvas
if (the text of AGraphic ≠ "") then
set the font of the text of AGraphic to "Benton Sans"
end if
end repeat
end repeat
end tell
end tell[/code]

You could add other conditions to the "if" statement, if there are other graphics you don't want to modify.

Andrew N 2008-08-20 06:16 PM

Ooops just saw your reply. Thanks for the script. I'll give it a go!


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

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