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 Search Today's Posts Mark Forums Read

Where to define personal variables? Thread Tools Search this Thread Display Modes
Im trying to use the notes feature for annotating wireframes. I love that notes will export to PDF but is there a way to show ALL notes collected say on a single canvas in a text field? So if I have 3 notes on three objects on a canvas, is there a way to show all contents of those notes in a single text field as a list??
Originally Posted by cwingrav View Post
Great discussion. This solved my problem. NOW, it would be nice if there was an document object model (DOM) behind the scenes so that we could do something like "Document.version" to get the current document's version number and the like. This would be SO very useful to all us power users out here.
I found it by taking a stab in the dark...In the Document:Data palette, there's a Version field. Fill that in, and use <%Version%> in your document. It works.
I love UserData except I have major problem with the way it works OR the way I understand it.

Here's the scenario:
I have several canvases. I have a shared layer included in all of them with a table that includes a "Summary" for that particular canvas. Am I able to include a variable on the shared layer that gets values from from the specific canvases?
Originally Posted by hansemannk View Post
Thank you for your answer. But my problem is: where is the place / the field to define this variable?

I understand:

1) there is a field to define a variable, but I don't now the field.
2) inside the "work space" I insert a Textfield with this variable, for example <%foo%>.

If I understand something wrong, than sorry for that.
This seems to only work on an instance by instance basis. Is it possible to create a global key/value relationship for the entire document that affects text boxes across multiple instances/pages at once?

There doesn't seem to be an easy way to set global variables, but there are a couple of workarounds.

1. As Uetzicle noted, there are a number of document variables in the Document:Data inspector. (There are ten, some in a pulldown.) If you're not using them already you can put whatever you want in those fields and access them anywhere using the <%Variablename%> syntax. Of course, you can't rename them, which is inconvenient.

2. Use a script:
Make a new layer in a convenient canvas and create a shape or piece of text. Set the shape's Properties:Action to "Runs a Script" and enter the following script:
repeat with theGraphic in every graphic of every layer of every canvas of the front document

if theGraphic is not self

set the value of user data item "myGlobal" of theGraphic to the text of self

end if
end repeat
Use <%Userdata myGlobal%> for your variable wherever you want. Hide and mark unprintable the layer with the variable-setting shape, only showing it when you want to set the variable: change its text and click with the Action Browse tool. (Surprisingly, I found that after the first action click the user data on all the objects actually changed whenever the text of this shape changed; no need for the tool.)

For more variables, you could make more shapes in the hidden layer, or perhaps more elegantly, replace the "set" line in the script with:
set the value of user data item "myGlobal" of theGraphic to the value of user data item "myGlobal" of self
Add similar lines for as many variables as you need, with a data key and value for each one in Properties:Note of the variable-setting shape. Change values there and use the Action Browse tool to set the variables. You could even label the shape "myGlobal = <%Userdata myGlobal%>, otherGlobal = <%Userdata otherGlobal%>" and so on. In that case you could keep the shape visible and use it as an annotation in the document.

(Thanks to member apl for the right syntax for referring to user data item values: .)

Last edited by john.gersh; 2011-06-15 at 08:50 AM..
I don't know this before, now i am learned.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Define constraint as a function of another task? juliabell OmniPlan General 1 2009-09-12 10:30 PM
Define group to be 100% complete juliabell OmniPlan General 1 2009-09-12 07:03 PM
How to define non-tree relationship? Schlaefer OmniGraffle General 1 2008-09-10 10:58 AM
Define with OmniDict beelers OmniWeb Feature Requests 0 2008-03-15 08:20 AM

All times are GMT -8. The time now is 09:13 AM.

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