Is it possible to get entire rows from shapesheet from code ?

Started by bazinga, January 11, 2016, 09:38:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bazinga

I know we can get the row values using CellsU but is it possible to get all the data / rows of shapesheet at once and store in an array?

Surrogate

you need get all rows in some section or whole shapesheet's row ?

Surrogate

Quote from: David J ParkercelMaker copies Visio custom properties, user-defined cells and actions to and from Excel.
Microsoft Office Visio shape developers often need to copy custom properties, user-defined cells, actions and connection points from one master to another.
celMaker is a developers tool that allows selected ShapeSheet™ sections to be documented, verified, enhanced and propagated from one Visio master to another, including the migration of complex formulae. Current version supports Custom Properties, User-defined cells, Actions, Connection Points and SmartTags*.

* Visio 2003 only
Feature Print ShapeSheet allow collect whole shapesheet's rows to excel

Quote from: David J Parker
Can I Print Out the ShapeSheet Settings?


The output displays the cell name, value, and formula in each section, in an extremely verbose manner. This makes for many rows in the worksheet, and a varying number of columns in each section.

bazinga

@Surrogate, Ideally I'd like to get all the rows with a Prefix for example all rows that have Prop. or all rows that have ABC. or anything I add as prefix.

BUt I think I can work it out if I manage to get all rows along with sections.

bazinga


Surrogate

My advice contain two step
1. Get data from GUI, using existing tools
2. Operate with data with your code

But you prefer more expensive way :)
You didn't answer which sections you need get ?

Surrogate

Sub bazinga()
Dim s% '
Set sh = ActiveWindow.Selection(1)
s = 244 ' select one ID in sections list
' Enum VisSectionIndices
' http://visualsignals.typepad.co.uk/files/visioenumerations.txt
'0 - visSectionFirst
'1 - visSectionObject
'3 - visSectionCharacter
'4 - visSectionParagraph
'5 - visSectionTab
'6 - visSectionScratch
'7 - visSectionConnectionPts
'8 - visSectionTextField
'9 - visSectionControls
'10 - visSectionFirstComponent
'239 - visSectionLastComponent
'240 - visSectionAction
'241 - visSectionLayer
'242 - visSectionUser
'243 - visSectionProp
'244 - visSectionHyperlink
'245 - visSectionReviewer
'246 - visSectionAnnotation
'247 - visSectionSmartTag
'252 - visSectionLast
'255 - visSectionInval
'255 - visSectionNone
For r = 0 To sh.RowCount(s) - 1
For c = 0 To sh.RowsCellCount(s, r)
Debug.Print sh.CellsSRC(s, r, c).Name, sh.CellsSRC(s, r, c).Formula, sh.CellsSRC(s, r, c).Result("")
Next
Debug.Print "---"
Next
End Sub

wapperdude

You may want to check out Paul Herber's Super Utilities.  I know it can copy certain sections from one shape and paste into another.

Wapperdude
Visio 2019 Pro

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: 290 (show)
Files included: 34 - 1321KB. (show)
Memory used: 1148KB.
Tokens: post-login.
Cache hits: 12: 0.00156s for 26,583 bytes (show)
Cache misses: 1: (show)
Queries used: 15.

[Show Queries]