Shapesheet of a Selection of Shapes via Code?

Started by david, September 15, 2008, 08:20:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

david

i've noticed that if i select several shapes then it shows all the identical custom properties of all the shapes i selected (and omits the rest).  i want to reach the relevant cells in the shapesheet by code.  but i checked about the Cells property and it belongs only to Shape and Style.  i didn't find a way to reach the shapesheet through Selection or Shapes.

anyone knows how to get them?

thanks in advance
David

Visio Guy

#1
Hi David,

There is no ShapeSheet for a selection. A selection is a group of shapes. When you see a union of data fields, Visio is doing that analysis on the fly.

To get at the ShapeSheet of selection members, you do something like this:


Dim sel as Visio.Selection
Set sel = Visio.ActiveWindow.Selection

Dim shp as Visio.Shape
For Each shp in sel
  Debug.Print shp.Cells("Prop.Cost").ResultIU
  Debug.Print shp.Cells("Prop.Cost").Formula
Next shp
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

david

thanks.

somehow i was sure that if i see common properties of several shapes then they're written in some shapesheet and i can reach them.
but never mind, i'll find the common properties in my code.

Browser ID: smf (possibly_robot)
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: 171 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1051KB.
Tokens: post-login.
Cache hits: 13: 0.00155s for 26,588 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]