How do I sort multiple Shapes by a Custom Name Field?

Started by OzzyMoto, February 26, 2013, 12:31:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

OzzyMoto

I have linked hundreds of shapes to an excel spreadsheet and would like the ability to sort them (left-to-right) based on a custom 'Name' (Prop.VisDM_Name) field - is this possible?

Here is an image of the unsorted shapes (MNEPPKI02-D should be in the left-most position followed by MNEPSQL01-D and MNEPWEB06-D).

Thank you!


Jumpy

In VBA I would create a custom record (in VBA it's "Type") containing the Name (value in Prop.VisDM_Name) and the ID of the shape. I would loop through all the shapes on the page and store name and Id in a record and the record in an array of records or a collection or sth. similiar. Then I would sort that array/collection using a sort algorythm. Then I would loop through the sorted array/collection and place each shape as desired, identifying each shape with the stored id in the record.

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 160 (show)
Files included: 34 - 1321KB. (show)
Memory used: 1095KB.
Tokens: post-login.
Cache hits: 12: 0.00287s for 26,582 bytes (show)
Cache misses: 1: (show)
Queries used: 15.

[Show Queries]