I need to add a rectangle into my Visio file and want to set the font and text color, how can I do this?
visio.Application app = new visio.Application();
visio.Document doc;
doc = app.Documents.Open(processPath);
visio.Page page = doc.Pages[1];
CreateVisio vis = new CreateVisio();
visio.Shape edit = page.DrawRectangle(3.2d, 6.9d, 4.9d, 7.9d);
hi i found that answer in this link
http://www.codeproject.com/Articles/109558/Creating-VISIO-Organigrams-using-C
How to Create a New VISIO Document
How to Get the Width and Height of the Sheet You are Working On
We are using this information about the sheet width and height to know where to place the boxes. We are putting the root boxes in the middle of the sheet by dividing the sheet width by the number of roots. Also we are subtracting from the yPosition the level number so that the boxes with increasing level number will get a lower position on the chart.
How to Create a Shape and Place it on the Chart (Drop it)
How to Set the Shapes Properties
Connecting the shapes is done using the method connectWithDynamicGlueAndConnector(). This method accepts two parameters, the parent shape and the childShape and will create the connector between. This method is the exact one found in VISIO SDK.