H
Hardolf
I have a problem inserting or modifying e.g. Attributes in a Class shape from
C#, using the Visio 11 COM Type Library. I get this message:
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in VisioUML.exe
Additional information:
Requested operation is presently disabled.
This is my sample code:
Microsoft.Office.Interop.Visio.Application m_VApp = new
Microsoft.Office.Interop.Visio.ApplicationClass();
Microsoft.Office.Interop.Visio.Document m_VDoc =
m_VApp.Documents.Open(sExeDir + @"..\..\Drawing1.vsd");
Microsoft.Office.Interop.Visio.Page m_VPage = m_VDoc.Pages["Static Structure
- Test"];
Microsoft.Office.Interop.Visio.Document m_VMDoc =
m_VApp.Documents["UMLSTR_M.VSS"];
Microsoft.Office.Interop.Visio.Master mstDrop =
m_VMDoc.Masters.get_ItemU("Class");
Microsoft.Office.Interop.Visio.Shape vNewShp = m_VPage.Drop(mstDrop, 2.5,
5.5);
Microsoft.Office.Interop.Visio.Shape vName = vNewShp.Shapes["Name"];
vName.Text = "Hello"; // OK
Microsoft.Office.Interop.Visio.Shape vAtt = vNewShp.Shapes["Attributes"];
vAtt.Text = "Hellooo"; // *** FAILED ***
Have you any suggestions?
Regards, Hardolf
C#, using the Visio 11 COM Type Library. I get this message:
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in VisioUML.exe
Additional information:
Requested operation is presently disabled.
This is my sample code:
Microsoft.Office.Interop.Visio.Application m_VApp = new
Microsoft.Office.Interop.Visio.ApplicationClass();
Microsoft.Office.Interop.Visio.Document m_VDoc =
m_VApp.Documents.Open(sExeDir + @"..\..\Drawing1.vsd");
Microsoft.Office.Interop.Visio.Page m_VPage = m_VDoc.Pages["Static Structure
- Test"];
Microsoft.Office.Interop.Visio.Document m_VMDoc =
m_VApp.Documents["UMLSTR_M.VSS"];
Microsoft.Office.Interop.Visio.Master mstDrop =
m_VMDoc.Masters.get_ItemU("Class");
Microsoft.Office.Interop.Visio.Shape vNewShp = m_VPage.Drop(mstDrop, 2.5,
5.5);
Microsoft.Office.Interop.Visio.Shape vName = vNewShp.Shapes["Name"];
vName.Text = "Hello"; // OK
Microsoft.Office.Interop.Visio.Shape vAtt = vNewShp.Shapes["Attributes"];
vAtt.Text = "Hellooo"; // *** FAILED ***
Have you any suggestions?
Regards, Hardolf