I was wondering if anyone has any tips on how to speed up automation in a Visio project in C#. The automation I have is building toilet stalls. I end up choosing to make 10 stalls, VBA takes about 3 seconds to make all the shapes.
I just finish coverting the VBA into a c# Form Application using the Microsoft.Office.Interop.Visio library. To do the same test, it takes 14 seconds.
I've been able to take off 3 seconds by making the visio application invisible and then making it visible after its done, but that is still not even close to what VBA does.
I've noticed with C# I can see the visio drawing building itself with each shape while in VBA it does not. So I also tried using: "Application.ScreenUpdating". In c# it takes a short data type so to make it false I tried making it 0, and it did nothing. Also I tried turning it on in VBA using "True" but that didn't turn it on.
So anymore more tips on making it faster? I'm surprised that VBA is faster than C#(maybe because its built into the Office Suite).