Milestone text overlapping

L

Lee Newson

Hi,

I have recently created a windows application that automatically creates a
set of Visio timelines from various schedule xml files. The idea of this is
so that these timelines can be created on the fly with the data being as up
to date as possible, without any user interaction.

The only problem i am haivng at he moment is that in some cases miletone
text is overlapping the text of another milestone. Does anyone know of a
good way to get round this? I have tried changing the height of the
milestones by using a randomly generated number however i still get the odd
milestone overlapping another (this obviously is only a problem with the
text as it make it unintelligeble)

cheers for any help...

Regards

Lee
 
C

Chris Roth [ Visio MVP ]

You can use the SpatialNeighbors method determine if a shape is overlapping,
enclosing, touching, or enclosed by another shape.

The milestone shapes have a couple of sub-shapes that hold text. You can get
at them via something like this:

shpMilestone.Shapes(2)

or whatever. You'll have to figure out the indices of the text-sub-shapes.

Then you can call SpatialNeighbors on the text sub-shapes. If they are not
touching any other shapes (that don't belong to shpMilestone - watch out for
that), then you are clear. Otherwise, bump the control handle up a quarter
inch or so until the text is clear.

I'm not sure about the scope of SpatialNeighbors -- if it returns other
sub-shapes, or just top-level shapes, or just shapes within the containing
group, so you'll have to double-check this.

--

Hope this helps,

Chris Roth
Visio MVP
 
L

Lee Newson

Hi Chris,

Cheers for your help with this, it has helped alot. I have another issue
though.

So that the milestones do not start to get too high above the timeline i
have also used an if statement to say if the height of the milestone goes
above 4 to flip the milestone vertically... this works except that when it
flips the milestone it is duplicating it!?!? this means that when i look at
the finished page all milestones that have been flipped have a duplicate
(still unflipped)... do you have any idea why this might have occured?

cheers

Lee
 
L

Lee Newson

Not to worry.... found the problem

Lee Newson said:
Hi Chris,

Cheers for your help with this, it has helped alot. I have another issue
though.

So that the milestones do not start to get too high above the timeline i
have also used an if statement to say if the height of the milestone goes
above 4 to flip the milestone vertically... this works except that when it
flips the milestone it is duplicating it!?!? this means that when i look at
the finished page all milestones that have been flipped have a duplicate
(still unflipped)... do you have any idea why this might have occured?

cheers

Lee



creates of
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top