Using Visio 2007
-
Helo, I need to create a dynamical organization chart using visio from C# code. Currently im using the following code only to test nothing special.
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
axViewer1.SRC = openFileDialog1.FileName;
Microsoft.Office.Interop.Visio.Application app = new Microsoft.Office.Interop.Visio.Application();
Microsoft.Office.Interop.Visio.Page currentpage = app.Documents.Open(openFileDialog1.FileName).Pages[1];
Microsoft.Office.Interop.Visio.Document stencil = app.Documents.OpenEx("Basic_U.vss", (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenDocked);
//Microsoft.Office.Interop.Visio.Window stencilwindow = currentpage.Document.OpenStencilWindow();
//app.SaveWorkspaceAs(@"C:\Users\Chris\Desktop\tezt.vsd");Microsoft.Office.Interop.Visio.Shape shape2 = currentpage.Drop(stencil.Masters\["Square"\], 10, 7.50); // create a dynamic connector from the stencil master collection Microsoft.Office.Interop.Visio.Shape connector = currentpage.Drop(stencil.Masters\["Dynamic connector"\], 4.50, 4.50); }
now the problem is here. On my computer the application is working fine because i have Visio 2007 installed and shapes are added etc.. but when the application is going to be used by the clients and they dont have visio installed the whole applicaiton wont work. Is there a way which i can create the charts dynamicaly at runtime without visio being installed??
-
Helo, I need to create a dynamical organization chart using visio from C# code. Currently im using the following code only to test nothing special.
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
axViewer1.SRC = openFileDialog1.FileName;
Microsoft.Office.Interop.Visio.Application app = new Microsoft.Office.Interop.Visio.Application();
Microsoft.Office.Interop.Visio.Page currentpage = app.Documents.Open(openFileDialog1.FileName).Pages[1];
Microsoft.Office.Interop.Visio.Document stencil = app.Documents.OpenEx("Basic_U.vss", (short)Microsoft.Office.Interop.Visio.VisOpenSaveArgs.visOpenDocked);
//Microsoft.Office.Interop.Visio.Window stencilwindow = currentpage.Document.OpenStencilWindow();
//app.SaveWorkspaceAs(@"C:\Users\Chris\Desktop\tezt.vsd");Microsoft.Office.Interop.Visio.Shape shape2 = currentpage.Drop(stencil.Masters\["Square"\], 10, 7.50); // create a dynamic connector from the stencil master collection Microsoft.Office.Interop.Visio.Shape connector = currentpage.Drop(stencil.Masters\["Dynamic connector"\], 4.50, 4.50); }
now the problem is here. On my computer the application is working fine because i have Visio 2007 installed and shapes are added etc.. but when the application is going to be used by the clients and they dont have visio installed the whole applicaiton wont work. Is there a way which i can create the charts dynamicaly at runtime without visio being installed??
I don't think so, it's like getting on a train where you didn't buy a trainticket. If the app doesn't work, try the 'try-catch' method around the area's where you are trying to do something with the visio files. edit: wtf... I wrote around with a T, I'm soo ashamed of myself :wtf:
-
I don't think so, it's like getting on a train where you didn't buy a trainticket. If the app doesn't work, try the 'try-catch' method around the area's where you are trying to do something with the visio files. edit: wtf... I wrote around with a T, I'm soo ashamed of myself :wtf:
No the application works fine on my computer where i have visio installed but it dosent work on the other computer im testing it on that dosen't have visio installed. Is there some other librariy that i can use to draw charts. Because to be honest the main reason im using this is to create a family tree.
-
No the application works fine on my computer where i have visio installed but it dosent work on the other computer im testing it on that dosen't have visio installed. Is there some other librariy that i can use to draw charts. Because to be honest the main reason im using this is to create a family tree.
-
No the application works fine on my computer where i have visio installed but it dosent work on the other computer im testing it on that dosen't have visio installed. Is there some other librariy that i can use to draw charts. Because to be honest the main reason im using this is to create a family tree.