dave-howard / vsdx

vsdx - A python library for processing .vsdx files
BSD 3-Clause "New" or "Revised" License
67 stars 25 forks source link

New Feature: Find Shape by Data Property #25

Closed dave-howard closed 3 years ago

dave-howard commented 3 years ago

the ability to find a shape by it's data properties, either property name, label, or value would have advantages over:

Shape Data would be a good way to identify shapes that require some action performed on them. methods may look like:

the first has the advantage of not having to look beyond the property row, the value requires finding cell element, but this should be a very minimal overhead each of the methods may be supplimented with a page.find_shapes_by_xxx that returns a list of matching shapes

dave-howard commented 3 years ago

Each of these should also be available from Shape object, to find a sub shape by data_property within that shape The Shape class should store the ShapeProperty items in a dict indexed on name so that it can be quickly retrieved to support these methods.

dave-howard commented 3 years ago

Added in v0.4.10 but used Shape data label instead of name, as these are more readily visible in Visio than property names and values - so they are a better way of identifing shapes to be manipulated.

Done