How track the original master's document from the shape

H

ha1o

Hi. I have a little question this time, but I can't solve it.

here is the code I use when I want to create a new shape with masters from
others files.

"Document stencil =
(Document)((Documents)drawingControl.Window.Application.Documents)["Stencil.vss"];
Master masterObj = stencil.Masters.get_ItemU(GraphShapeID.ToString());
Page targetPage = (Page)drawingControl.Window.PageAsObj;
Shape shapeObj = targetPage.Drop(masterObj, this.shapePos.initialLocationX,
this.shapePos.initialLocationY);"

I have different stencil files. I am using the Visio object(drawingControl)
"ShapeAdded" event. this method has a parameter pointing at the new shape.

"private void drawingControl_ShapeAdded(object sender,
AxMicrosoft.Office.Interop.VisOcx.EVisOcx_ShapeAddedEvent e)
{
e.shape.ToString();
}"

my problem is that I need to know which stencil file the user used to obtain
the new shape and I can't find the file which the original master belongs to
from the shape variable in the event.

I am hoping you can point me at the right direction.

thanks for your time.
 
J

JuneTheSecond

Master property might give master name. Idon't know how I can know
where it comes from other than writing the fullname in user defined cell.
 
H

ha1o

hi JuneTheSecond

you mean that I must create a custome cell with that contains the file name
so I could find out the original stencil file?
 

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