The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Access "Wrap To Shape" property from Applescript? (http://forums.omnigroup.com/showthread.php?t=27735)

Sophie 2013-01-09 11:25 AM

Access "Wrap To Shape" property from Applescript?
 
How do I control the property behind the "Wrap To Shape" checkbox via Applescript?

Thanks, Rob ! :-)

Des.P 2013-01-09 11:34 AM

Last I checked I could not find it either. It does not seem to show up via the "Copy As Applescript" technique.

RobTrew 2013-01-09 09:44 PM

If you select a shape and use the inspector to uncheck "wrap to shape", you should find that you can restore wrapping by setting the [I]autosizing[/I] property of the shape to [I]overflow[/I].

[CODE]
tell application id "OGfl"
set lstSeln to (selection of front window) as list
tell item 1 of lstSeln to set autosizing to overflow
end tell
[/CODE]

Sophie 2013-01-10 05:44 AM

2 Attachment(s)
Interesting. But if my script itself is creating the shapes, and I want that script to selectively turn on or off the 'Wrap' boolean property with no manual intervention, how do I do this?

p.s. in my case, I need the shapes with autosizing=overflow to have Wrap=False, but need to do it via script.

p.p.s. I need to make a small colored shape for each of my objects, with some text describing each shape offset to the right of each object (attached). I'm tweaking the 'side_padding' property to offset the text, using autosizing of 'Overflow' so the text will show outside the shape boundary, and need 'Wrap'=False so the text will show up at all.

Thanks!

RobTrew 2013-01-10 08:23 AM

I'm afraid that the solution to that eludes me :-)

May be time for [B]Help > Send Feedback ...[/B] in the OGfl menu.

Good luck !

whpalmer4 2013-01-10 08:40 AM

Maybe I don't understand the problem correctly, but how about using a document which starts out with a set of the desired shapes to use as templates which the script duplicates to get around any weakness in the scripting model? You could have them be drawn invisibly or perhaps hidden away in another layer.

RobTrew 2013-01-10 08:46 AM

That seems a good solution, especially as the [B]Help > Send feedback [/B] process may not yield much. There was a [URL="http://forums.omnigroup.com/showthread.php?t=24434"]hint last year[/URL] that wrap-control may be some kind of edge case that fell outside the main (applescriptable) model, and has even been known to fall beyond reach of the UI-accessible model.

Sophie 2013-01-10 10:31 AM

Thanks for the suggestions! Using hidden shapes as a workaround script-accessible stencil is an interesting idea. Unfortunately my shapes are not statically predefined, and I need to generate all aspects of the shapes by script. Hmmm...

whpalmer4 2013-01-10 12:59 PM

Isn't there a set of shapes which encompasses all the possible shapes your script will need? You should be able to resize, recolor, etc. on the fly, I think, it's just a matter of getting that pesky text-wrap property by inheritance.

Sophie 2013-01-13 08:38 PM

Hmm. If I manually put such shapes on a hidden layer, how would I access / manipulate that hidden layer to duplicate a shape from there onto a working (non-hidden) layer or another canvas, without the convenience of "Copy to Applescript"?

Thanks!


All times are GMT -8. The time now is 06:03 PM.

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