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

 
Applescript to get "current" layer Thread Tools Search this Thread Display Modes
I've been learning about scripting OmniGraffle with AppleScript (and Ruby via rb-appscript). So far, things have been going great, but one thing I have not been able to figure out from the OmniGraffle AppleScript dictionary is how to determine which layer is currently active (i.e. has the little pencil icon to the left of it in the canvas/layer bar).

Does anyone know whether/where/how this info can be obtained via AppleScript?

Thanks,
Dave
 
Quote:
Originally Posted by davidm View Post
one thing I have not been able to figure out from the OmniGraffle AppleScript dictionary is how to determine which layer is currently active (i.e. has the little pencil icon to the left of it in the canvas/layer bar)
It does look as if the dictionary only offers Locked, Prints and Visible.

One for Help > Send Feedback ... in the main menu, I think.

(Not sure what your goal is, but perhaps you could try making an invisible new object at the beginning of the graphics of the canvas, test it to see which layer it had been placed on, and then delete it. To write to a particular layer, you can obviously lock down the others).


--

Last edited by RobTrew; 2010-11-03 at 01:04 AM..
 
Quote:
Originally Posted by RobTrew View Post
It does look as if the dictionary only offers Locked, Prints and Visible.

One for Help > Send Feedback ... in the main menu, I think.
--
Thanks, I'll do that.

Quote:
Originally Posted by RobTrew View Post
(Not sure what your goal is, but perhaps you could try making an invisible new object at the beginning of the graphics of the canvas, test it to see which layer it had been placed on, and then delete it. To write to a particular layer, you can obviously lock down the others).
--
Surprisingly, this does not work. My goal is to create a script that will plot a simple graph on the "current layer", but unless one directs the "make new line..." command at a specific layer it seems to always draw on the first layer of the canvas's "layer list" regardless of whether it has the "pencil" icon next to it. If I rearrange the layers to put the desired layer at the "front" of the layer list, then I can get it to where I want it, but rearranging the layers is not so convenient.

Thanks again,
Dave
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to override formatting of content pasted from another app? [A: Edit -> "Paste w/ Current Style"] jojoba OmniOutliner 3 for Mac 2 2013-04-05 08:03 AM
"Switch to project view" broken in current build? al_f OmniFocus 1 for Mac 3 2007-09-19 06:00 AM
The pointless "focus" functionality with current implementation of single tasks ksenia OmniFocus 1 for Mac 6 2007-08-13 08:32 AM
Make "Paste w/Current Style" the default? Roger Barre OmniOutliner 3 for Mac 3 2007-07-17 11:59 AM
"Show Bookmark Info" always opens your bookmarks in the current browser zwhite OmniWeb Bug Reports 0 2006-05-02 01:08 PM


All times are GMT -8. The time now is 01:20 AM.


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