Avatar of gkarras
 asked on

Page Layout Bug

I am creating a visio 2007 page with almost 900 shapes that represent a geneology tree. The creation of the page is done programatically with the following steps:
1) opening a new visio doc
2) dropping the shapes
3) connecting parents to childs
4) re layout the page with visPLOPlaceHierarchyTopToBottomCenter and visLORouteSimpleSN

The problem is that the layout is not 100% succesfull. Some shapes get on top of others. I 've tested my code thoroughly but I haven't figure out something.

I 've even used the visio sdks sample (WBSTreeView.sln) which has a similar output but nothing there too. Practically with no code changes in this project, I have inserted the data in the mpd file and changed the page layoyt but still no luck.

Therefore I am concluding that the Hierarchy layout in visio 2007 has a problem. Any suggestions?

Thanks in advance
Microsoft Visio

Avatar of undefined
Last Comment

8/22/2022 - Mon
Scott Helmers

Have you experimented with setting ShapePermeablePlace=FALSE. According to the SDK, this prevents shapes from being placed on top of a shape during layout operations.

Scott thanks for the reply. When I came accross this problem, the first step I did was to play with this property. This is waht I did:

I 've unchecked the raleted checkbox on the master's shape Behavior property. The shapes are dropped into the page and when I open the file I am going into the shape's Behavior property and everything looks ok (the check box is not checked).

Your idea is in the right direction though. The only thing I can think of is that either this property doesn't work, or there is something else that overrides this.

With little more playing around, I came up with the following:

1) Differrent output is achieved, depending on how I connect the shapes, eg: (When I connect parents to childs I get 10 shapes overlapping and wjen I connect childs to parents 15 different shapes are overlapping)

2) When I am setting the "Alignment" property in the "Configure Layout" dialog to Right or Left everything is fine. The problem exists only when I set it to Center (    Application.ActiveWindow.Page.PageSheet.CellsSRC(visSectionObject, visRowPageLayout, visPLOPlaceStyle).FormulaForceU = "17")

Therefore I am concluding that there must be a bug with the alignment property. Anybody knows how to report this?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Scott Helmers

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.

Scott thanks again.

I 've already tried the forum suggestion but still no luck. In any case I 'll leave the question open just a few days more just in case, and then reward u the answer. Propably I'll give a try to your first "costly..." suggestion just to see what happens.

Best regards,

thanks again