MikeShepard / VisioBot3000

Simple Visio Automation from Powershell
MIT License
50 stars 13 forks source link

New-VisioContainer skipping first shape object specified in -contents #73

Closed phatmandrake closed 6 years ago

phatmandrake commented 6 years ago

When using the New-VisioContainer function, the first object specified is left outside of the container. It seems to be dropping the shapes then dropping a container around them, but ignores the first object.

New-VisioApplication

New-VisioDocument -From ".\IntegrationDiagram.vstx"

Register-VisioStencil -name Containers -Path ".\MyContainers.vssx"

Register-VisioContainer -Name Domain -From Containers -MasterName Domain

Register-VisioShape -name LoadBalancer -From Containers -MasterName LoadBalancer

New-VisioContainer -shape (Get-VisioShape Domain) -Label MyDomain -Contents { 
     New-VisioShape -Master LoadBalancer -label LoadBalancer01 -X 2 -Y 2 
     New-VisioShape -Master LoadBalancer -label LoadBalancer02 -X 2 -Y 4 
     New-VisioShape -Master LoadBalancer -label LoadBalancer03 -X 2 -Y 6
}

Using the example stencils.