Apologies for re-post, I could not edit the title of the earlier post.
I am using Applescript to set the properties of some Omnigraffle shapes. I am using Python/appscript, but would appreciate any pointers in plain Applescript as well (or anything else).
When I get the properties of a shape, Omnigraffle returns a dictionary of all key-value pairs (color, text, stroke, locked, etc.). When I create a new shape I can similarly send in a bunch of properties as a dictionary e.g. (in Python/appscript):
doc.make(new=k.label,
at=line.labels.end,
with_properties={k.text: 'foo', k.draws_stroke = True})
Is there a 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. When I tried
shape.properties.set({k.locked: True}) -- it worked.
But when I tried:
shape.properties.set({k.text: 'foo'}) -- it did nothing.
Thanks
I am using Applescript to set the properties of some Omnigraffle shapes. I am using Python/appscript, but would appreciate any pointers in plain Applescript as well (or anything else).
When I get the properties of a shape, Omnigraffle returns a dictionary of all key-value pairs (color, text, stroke, locked, etc.). When I create a new shape I can similarly send in a bunch of properties as a dictionary e.g. (in Python/appscript):
doc.make(new=k.label,
at=line.labels.end,
with_properties={k.text: 'foo', k.draws_stroke = True})
Is there a 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. When I tried
shape.properties.set({k.locked: True}) -- it worked.
But when I tried:
shape.properties.set({k.text: 'foo'}) -- it did nothing.
Thanks