You can use your favorite social network to register or link an existing account:
Or use your email address to register without a social network:
Sign in with these social networks:
Or enter your username and password
Forgot your password?
Yes, please link my existing account with for quick, secure access.
No, I would like to create a new account with my profile information.
Visio Answers forum
Visio MSDN forum
MSDN for Visio Developers
TechNet for Visio Services in SharePoint
Chris Hopkins' Visilog
Our previous posts have discussed some of the great end user features we’ve added to the new Visio. For developers, the new Visio supports programmatic access for many of its new features. The new Visio API contains methods that let developers change shapes and pictures, add comments, duplicate pages, and apply themes.
In this blog post, we will introduce some of the new API by providing brief descriptions about the methods, properties, and objects. We will also see some of them in action using examples. This is not meant to be a complete reference; you can view a full list of all new API in the What's new for Visio 2013 developers article on MSDN.
The new Visio supports a new Change Shape feature, which allows for the seamless replacement of an existing shape or selection of shapes in your document with any other shape in an open stencil. The following method evokes the Change Shape feature on a given shape.
Returns a new instanced shape which has replaced the given shape.
Using the method above, we will replace the shapes on this Basic Flowchart diagram with shapes from our updated Workflow template.
Note: In the below code snippets, the Visio namespace is an abbreviation of Microsoft.Office.Interop.Visio. The meanings of most other variables should be apparent from the context.
1: // In the following C# code, we are opening this diagram along with the updated Workflow Steps stencil
2: // and we are selecting the first page
3: Visio.Document workflowStepsStencil = GlobalVars.Application.Documents.OpenEx(_"WFSTME_U.VSSX", Visio.VisOpenSaveArgs.visOpenHidden );
4: Visio.Document diagram = GlobalVars.Application.Documents.Open(documentPath);
5: Visio.Page page = diagram.Pages;
7: // Here, we are setting up the shapes that we wish to replace, along with the masters that we wish to replace them with from the Workflow Steps stencil:
8: Visio.Shape processShape = page.Shapes["Process"];
9: Visio.Shape decisionShape = page.Shapes["Decision"];
10: Visio.Shape subprocessShape = page.Shapes["Subprocess"];
11: Visio.Shape custom3Shape = page.Shapes["Custom 3"];
12: Visio.Shape endShape = page.Shapes["Start/End"];
14: Visio.Master issueMaster = workflowStepsStencil.Masters["Issue"];
15: Visio.Master requestMaster = workflowStepsStencil.Masters["Request"];
16: Visio.Master rejectMaster = workflowStepsStencil.Masters["Reject"];
17: Visio.Master approveMaster = workflowStepsStencil.Masters["Approve"];
18: Visio.Master endMaster = workflowStepsStencil.Masters["End"];
20: // Finally, we replace the existing shapes with new instanced shapes from the specified masters:
23: decisionShape.ReplaceShape(requestMaster, 8);
24: subprocessShape.ReplaceShape(rejectMaster, 3);
This yields the following result:
You’ll notice that the formatting was lost when we replaced the Decision shape with the Request shape. The reason is that we set the ReplaceFlags argument’s enumeration to “8”, and thus the formatting did not transfer.
You’ll also notice that the text was lost when we replaced the Subprocess shape with the Reject shape. The ReplaceFlags argument’s enumeration “3” is an additive combination of enumerations “1” and “2”. Enumeration “1” ensures that text, data, and formatting are transferred; however, enumeration “2” specifically forbids text from transferring and takes priority over “1”. Thus, data and formatting were transferred, but text was not.
The new Visio allows any existing picture shape to be changed to a new picture. The following method evokes this functionality on a given picture shape.
Replaces the given picture shape with a new picture.
The new Visio includes a new commenting framework, where comments can now be associated with a shape or a page.
The follow objects, methods, and properties are used to work with comments on shapes and pages.
Returns a Comments object listing all comments associated with the given shape.
Returns a Comments object listing all comments associated with the given page and all shapes contained in the given page.
Returns a Comments object listing all comments associated with all shapes contained in the given page.
Returns a Comments object listing all comments associated with all pages and all shapes contained in the given document.
An object containing properties to reference a comment’s author name, text, and creation date, amongst others. Includes a method to delete the comment.
Deletes the Comment object.
An object containing an indexed list of Comment objects. Includes methods to add and delete all comments from the list.
Appends a string as a new Comment object to the end of the Comments object list.
Deletes all Comment objects from the Comments object.
The new Visio supports a new Duplicate Page feature, which allows for the replication of any existing page in a document. Duplicate Page will copy the given page and all contained shapes, and return the copy as a new page within the same document.
The following method evokes the Duplicate Page feature on a given page.
Returns a new page within the same document that is a copy of the given page.
We hope this brief look at some of our new API was helpful. We’ll be covering API support for our new themes, variants, and styles feature in a future post. As a reminder, you can view a full list of all new API in the What's new for Visio 2013 developers article on MSDN. We’re interested to hear what developers think of this API functionality. Please use the Send a Smile feedback tool or leave a comment below.
Lots of customers have told us that they want to exchange one shape with another without losing the text, connections and formatting. The Change Shape feature in the new Visio gives you this functionality. In this post, we will review the Change Shape
Новый Visio поддерживает новые темы, варианты и стили тремя новыми способами: Page.SetTheme, Page.SetThemeVariant и Shape.SetQuickStyle. Эти методы позволяют разработчику задать тему для текущей страницы, применить вариант темы и настроить фигуру с использованием
Over the last few months, we’ve been posting about the new Visio – discussing features in depth and introducing the editions that will be available. Before we get started on a new series of posts, we thought it would be helpful to summarize