The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Unique ID number (http://forums.omnigroup.com/showthread.php?t=17457)

Thorsander 2010-08-20 05:38 AM

Unique ID number and connector lines
 
3 Attachment(s)
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

Thorsander 2010-08-26 06:08 AM

So, does no one have any input regarding this matter?
Am I the only one who desires these two types of functions?

whpalmer4 2010-08-26 11:55 AM

Thorsander, you should also ask the OmniGraffle support ninjas directly, via Help->Send Feedback or email to [email]omnigraffle@omnigroup.com[/email]. 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
[/code]

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
[/code]

Rob should be along shortly to explain how to make this code run faster with references and where clauses :-)


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

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