Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion VisioShapeData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
.PARAMETER Name
Which shape data field you want the value from

.PARAMETER All
Returns all shape data rather than just one

.INPUTS
None. You cannot pipe objects to Get-VisioShapeData.

Expand All @@ -23,9 +26,20 @@
Function Get-VisioShapeData{
[CmdletBinding()]
Param($Shape,
$Name)
[string]$Name,
[switch]$All)

if($all){
0..($shape.Section(243).Count-1) | foreach-object {
[PSCustomObject]@{Label=$shape.CellsSRC(243,$_,2).Formula.Replace('"','')
Name=$shape.CellsSRC(243,$_,2).RowName
Value=$shape.CellsSRC(243,$_,0).Formula

ValueObject=$shape.CellsSRC(243,$_,0)}
}
} else {
$Shape.Cells("Prop.$Name").Formula.TrimStart('"').TrimEnd('"')
}
}

<#
Expand Down