The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Set a bunch of shape properties in one call? (http://forums.omnigroup.com/showthread.php?t=26810)

Sophie 2012-11-07 09:28 PM

Applescript: Set a bunch of shape properties in one call?
 
When I get the properties of a shape, Omnigraffle returns a dictionary of key-value pairs. When I create a new shape I can similarly send in a bunch of properties as a dictionary e.g. (Python/appscript):

doc.make(new=k.label,
at=line.labels.end,
with_properties={k.text: 'foo', k.draws_stroke = True})

Is there a similar way to update a bunch of properties of an existing shape with a single call, passing in a dict of properties? If so, any restrictions on which properties can be set this way?

e.g. I tried
shape.properties.set({k.locked: True}) and it worked.

shape.properties.set({k.text: 'foo'}) and it did nothing.

Thanks


All times are GMT -8. The time now is 02:04 AM.

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