Visio Shape Name/Page Name Problem

H

Husain

Hi,

I have developed an application wherein I have embedded the Visio
ActiveX control in a Windows Application.

Whenever the user drags a shape onto the drawing surface, the program
code (in C#) adds a page to the drawing control with the Page name as
the type of shape dragged. Eg, when a Activity Shape is dragged the
page name is assigned as 'Activity1', or is a SubProcess shape is
added, the page name is set to 'SubProcess1' etc. The number suffixed
to the Shape name is programatically determined and is always a whole
number.

However, on one ocassion, the page name has got a name like
'Activity5.23'. This is causing problems in the rest of the code. This
problem is not reproducible and has occurred only twice. Can someone
give any insight as to why such a problem has arisen.

Thanks,
Priya.
 
M

Mark Nelson [MS]

If you are assigning the page name from a shape name, then you must deal
with instances where the shape name has a decimal in it. The best way to
reproduce this is to create two different documents containing shapes
(masters to be precise) with the same shape name. Drag the shapes into the
same document. This will produce a master shape with a decimal in the name.
 

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