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

 
Unique ID number Thread Tools Search this Thread Display Modes
Hi,

I've been trying out the trail version of OmniGraffle 5 for a couple of days and have run into two questions that needs to be solved before I decide to buy a license.

Issue 1
I need to be able to create unique ID numbers to be shown above each and every wireframe screen (See attached image) that I make - to make it easier to identify what screen I'm talking about with my customer. I've been searching intensively on the net to find an answer but without result. My conclusion is that there isn't any predefined Variable such as <%ShapeID%> that I can place as a label within the shape.

If you expand the Layer List view (sidebar) and select the "Move object" layout - you will be able to se a number infront of each and every object/shape that you've put on the Canvas (See attached image). That number seams to be unique (as an identifier) being able to grab that number and "print" it on the screen would be satisfying indeed.

In Visio this is possible through writing a simple Macro - what about OmniGraffle?

Does anyone know how to grab this ID number OR know How I could create a unique ID number and "publish" it (show it) on the screen?

Issue 2
I have several nodes (in my case several mobile screen mock-ups on the same canvas) that I want to connect to each other. When I drag a arrow-line (connector) between nodes far away from each other with one or several screens between - the connector-line is placed upon/above the screens between (See attached image). I would like the connector-line to be "intelligent" and avoid crossing screen's (objects) on it's way to the destination - is this possible.
Once again: Visio provides these types of "intelligent" connectors - that automatically changes the path of the connector-line as it reaches for it's destination point.

Does anyone know if there is a solution to this issue?

Sincerely,
Simon
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2010-08-20 at 15.33.09.png
Views:	366
Size:	18.4 KB
ID:	1536   Click image for larger version

Name:	Screen-shot-2010-08-20-at-15.27.26.jpg
Views:	396
Size:	20.0 KB
ID:	1537   Click image for larger version

Name:	Screen-shot-2010-08-20-at-15.41.58.jpg
Views:	363
Size:	2.7 KB
ID:	1538  

Last edited by Thorsander; 2010-08-20 at 05:45 AM.. Reason: More detailed information
 
So, does no one have any input regarding this matter?
Am I the only one who desires these two types of functions?
 
Thorsander, you should also ask the OmniGraffle support ninjas directly, via Help->Send Feedback or email to omnigraffle@omnigroup.com. There's no guarantee they'll see and respond to a forum post, but they will definitely get the support email.

I think you can do what you want for your first question with a bit of Applescript. I'm not sure what that number you are displaying in your screenshot is. If it is the id of the graphic, I'll warn you that it is only unique to that canvas, not the document.

There's a dictionary for storing user-specified data on each graphic, called user data. To display a value from that dictionary, use the variable <%Userdata KEYNAME%> where KEYNAME is the key you used when adding the value.

The following snippet of Applescript will draw a rectangle on the selected canvas, populate the MyUniqueID field in the dictionary with the shape id, and add some text to display the value.

Code:
tell application "OmniGraffle Professional 5"
	tell canvas of front window
		set myShape to make new shape at end of graphics with properties {size:{234.0, 264.0}, origin:{70.0, 49.0}, text:{"<%Userdata MyUniqueID%>"}}
		
		set user data of myShape to {MyUniqueID:(id of myShape as number)}
		
	end tell
end tell
The following bit of code will loop through every graphic in the document and populate the dictionaries. You can paste that variable string into a handful of objects to see that it has done so.
Code:
tell application "OmniGraffle Professional 5"
	--Get the current document for later use 
	set currentDocument to document of front window
	
	--Get a list of the canvases
	set theCanvases to every canvas of currentDocument
	--Loop over each canvas
	repeat with aCanvas in theCanvases
		--Make sure that the current canvas is displayed 
		set canvas of front window to aCanvas
		
		--get a list of groups for this canvas
		set theGroups to every graphic of aCanvas
		
		--loop over each group/graphic
		repeat with aGroup in theGroups
			
			set user data of aGroup to {MyUniqueID:(id of aGroup as number)}
		end repeat
	end repeat
end tell
Rob should be along shortly to explain how to make this code run faster with references and where clauses :-)
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unique (?) uses - list them here! kylera Applying OmniFocus 3 2013-01-22 05:33 PM
Links to files - OG seems unique Simon Knight OmniGraffle General 0 2012-01-26 12:09 PM
variable "unique ID number" mattao OmniGraffle General 1 2010-10-25 07:11 PM
is URL completion unique? FredH OmniWeb General 1 2007-07-27 12:12 PM
Unique item IDs sunshine OmniPlan General 3 2006-08-04 10:16 AM


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


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