Hi all,
I'm new to Visio so please let me know if this question is unclear.
I'm building an org chart with the intent of carrying it across to PowerBI. The org chart has less than 300 people so I expected would have only 300 shapes (double that if it includes the connectors). When I add the shapes to a layer though, it's telling me there are what equates to 10 shapes per resource. I have only been able to reduce the number of shapes by deleting the photo which makes it 9 shapes per resource. As there is a limit of 1000 shapes in order to display a Visio diagram in PowerBI, this is a show stopper.
Any advice on how to reduce the 'number of shapes' would be appreciated.
Thanks
KC
Even if you reduce each entity to 1 shape, you're - with 300 people - far over the limit of 100 shapes anyway.
So the task should rather be to increase the limit of 100, isn't it?
Apologies, a typo. Permitted 1000 shapes. I've now corrected.
KC:
Rather than a technical solution, how about a topology solution? For example, you could break it up into several smaller ones, such as one per department, then string them all together once you get them into PowerBI. I did something similar (http://visguy.com/vgforum/index.php?topic=7022.msg29412#msg29412) when I ran into the Visio limit for a drawing size by breaking it up into manageable pieces. A pain, but better than nothing.
Good luck!
- Ken
For the sole purpose of exporting the data, you can replace the shapes by simpler ones by means of a macro.
Sub replaceShapes()
Dim shp As Shape
Dim sel As Selection
Application.ActiveDocument.SaveAsEx "C:\Temp\Temp.vsd", visSaveAsWS + visSaveAsListInMRU
openBlocksStencil
ActiveWindow.SelectAll
Set sel = ActiveWindow.Selection
For i = sel.Count To 1 Step -1
Set shp = sel(i)
Debug.Print shp.ID
If shp.CellExistsU("user.msvReplaceClass", visExistsAnywhere) Then
shp.Cells("user.msvReplaceClass").FormulaU = Chr(34) & Chr(34)
shp.ReplaceShape Application.Documents.Item("BLOCK_M.VSSX").Masters.ItemU("Box")
End If
Next i
End Sub
Sub openBlocksStencil()
On Error Resume Next
Application.Documents.OpenEx "block_m.vssx", visOpenRO + visOpenDocked
End Sub
I made sure to save the current file as temporary in c:\temp. You may want to put more safety in that line of code.
The macro needed to make sure that the organigram shapes can be replaced by ones not belonging to the special addin. That are the lines with "msvReplaceClass".
The result is a drawing where every organigram entity gets replaced by a simple rectangle. The new rectangles get the shape data of the original shape ... as long as they have a value!
The replacement removed somehow the connectors. I don't know if you need them in the other app. You could either code the dependencies in an extra field, or handle by yourselves (code) the connectors.
HTH,
Y.
PS: instead of replacing the shapes, you can also delete all the sub-shapes. eg: for each subShp in shp.shapes / subshp.delete