Drawing control properties

Started by nixa333, September 05, 2011, 08:17:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nixa333

Hi,

I started using Visio 11.0 drawing control for my project. The problem I have is lack of documentation so I'm pretty much stuck on basic things. I need to set the paper size to A3 before application starts, but    "document.PaperSize = VisPaperSizes.visPaperSizeA3;"   doesn't do the trick. Also i need to somehow choose between portrait and landscape mode of paper. Also I need to find out height and width of that paper from code so I could draw shapes dynamically. Essentially i need to access paper properties if someone could explain me how.     

Jumpy

The document has a Pages-Collection. Each page can have different properties like for example page size.
So you need access to the page(s) to set papersize.

I've not used the drawing control, yet, but I guess you should first experiment with Visio directly (learn the object model) and than start implementing the drawing control.

nixa333

I do understand Visio object model, it's the API I'm having problems with. Thx for your reply I'll try that.

nixa333

I tried what Jumpy suggested but there's a PaperSize property on a Document, not on Page. Document.Pages[n] doesn't have PaperSize property


nixa333

thank you very much, this helped me a lot :D