Vbug nov 2010   Visio Validation
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Vbug nov 2010 Visio Validation

  • 930 views
Uploaded on

Presentation given by David Parker (MVP) to VB User Group November 2010 about the ability to create custom validation rules in Visio 2010 Premium

Presentation given by David Parker (MVP) to VB User Group November 2010 about the ability to create custom validation rules in Visio 2010 Premium

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
930
On Slideshare
774
From Embeds
156
Number of Embeds
3

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 156

http://blog.bvisual.net 152
http://www.linkedin.com 3
http://translate.googleusercontent.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Validation Business Rule Modeling Business Rule Visualization Import Rules
  • Sub Validate([RuleSet As ValidationRuleSet], [Flags As VisValidationFlags]) Member of Visio.Validation
  • Event RuleSetValidated(RuleSet As ValidationRuleSet) Member of Visio.Application, Visio.Document, Visio.Documents, Visio.InvisibleAppFunction AddIssue([TargetPage As Page], [TargetShape As Shape]) As ValidationIssueMember of Visio.ValidationRule
  • The UI doesn’t Clear, removes individual issues from dirty pages
  • Change to show rule is processed even if ignored, but it is not displayed
  • Role()Returns an integer indicating the shape role: {Element = 0, Connector = 1, Container = 2, Callout = 4}. OnLayer(LayerName)Returns a Boolean indicating whether the shape is a member of the specified layer. Returns a Boolean indicating whether layer exists on page if called on a Page. AggCount(Set)Counts the number of shapes in a set.
  • FunctionDescriptionConnectedShapes(Direction)Returns the set of shapes, matching the Direction criteria, connected to the shape. The Visio.VisConnectedShapesFlagsconstant values are:visConnectedShapesAllNodes = 0visConnectedShapesIncomingNodes = 1visConnectedShapesOutgoingNodes = 2GluedShapes(Direction)Returns the set of shapes, matching the Direction criteria, glued to the shape. GluedShapes(n), where n is one of the following Visio.VisGluedShapesFlags constant values: visGluedShapesAll1D = 0 visGluedShapesIncoming1D = 1 visGluedShapesOutgoing1D = 2 visGluedShapesAll2D = 3 visGluedShapesIncoming2D = 4 visGluedShapesOutgoing2D = 5ContainerMembers()Returns the set of shapes that are members of the container / list shape. ListMembers()Returns the set of shapes that are members of the list shape. Callouts()Returns the set of shapes that are callouts on the shape. ParentContainers()Returns the set of containers that the shape belongs to. ShapesOnPage()Returns the set of top-level shapes on page. If no page specifier precedes the function, the shape’s containing page is assumed. FilterSet(Set,FilterExpression)Returns the subset of shapes in a set that match an expression. OnBoundaryOf()Returns the set of containers such that the shape is on the boundary of these containers.
  • Part of new Rules Tools add-in
  • Ruleset XSL is part of new Rules Tools add-in
  • An example rule

Transcript

  • 1. David J Parker MVP (Visio) bVisual ltd
  • 2. Need Premium for Validation!
  • 3.  Silverlight application to view built-in rules • Click http://www.visiorules.com/rulesexplorer.html
  • 4. Free Silverlight application
  • 5. Create a drawing from one that containsrule set(s) orImport rule set(s) from an existingdocumentEnable one or more of the rule setsSelect Process / Check Diagram orCall document.Validate in codeReview issues
  • 6. Define rules using quasi-ShapeSheetformulae and/orRespond to document.RuleSetValidatedevent Useful for cyclic connections, for example Use ValidationRule.AddIssue
  • 7. The Validation Process
  • 8. Loop through each Target TypeCheck that Filter Expression evaluates toTrue Abort if FalseCheck that Test Expression evaluates toFalse Abort if TrueAdd Issue Target (document. Page or shape) Rule
  • 9. Save as VDX New v14 namespaceView in XML reader, eg XML Notepad
  • 10. Role()=n 0=Element,1=Connector,2=Container,4=CalloutHasCategory(category)OnLayer(layername)Is1D()StrSame(Left(MasterName(750),n),name)AggCount(set) = n, >n, <n, etc
  • 11. ConnectedShapes(direction)GluedShapes(direction)ContainerMembers()ListMembers()Callouts()ParentContainers()ShapesOnPage()OnBoundaryOf()
  • 12. TWO books on Visio
  • 13. Click http://www.visiorules.com/
  • 14. Microsoft Visio 2010 Business Process Diagramming and Validationsee https://www.packtpub.com/microsoft-visio-2010-business-process-diagramming/bookSample ChaptersChapter 2 : Understanding the Microsoft Visio Object Modelsee https://www.packtpub.com/sites/default/files/0141-chapter-2-understanding-the-microsoft-visio-object%20.pdfChapter 3 : Understanding ShapeSheet™ in Microsoft Visio 2010see http://www.packtpub.com/article/understanding-shapesheet-microsoft-visio-2010For latest news, updates and rule sets, visit http://www.visiorules.com
  • 15. Click http://www.visualizinginformation.com/
  • 16. Extension to Process tab
  • 17. Adding validation to DFDs
  • 18. There are a number of rules that are commonly followedwhen creating DFDs:1. All processes must have at least one data flow in, and one data flow out2. All processes should modify the incoming data, producing new forms of outgoing data3. Each data store must be involved with at least one data flow4. Each external entity must be involved with at least one data flow5. A data flow must be attached to at least one process6. Data flows cannot go directly from one external entity to another external entity; such flows need to go through at least one process.
  • 19. There are also some conventions that could beconsidered.:1. Do not allow a single page of a data flow diagram to get too complex—it should have no more than ten components. If it has more than this, combine some components into a single, self- contained unit and create a new DFD for that unit.2. Each component should be labeled with a suitable description.3. Each data flow should be labeled describing the data flowing through it.4. Each component and subcomponent should be numbered in a top- down manner.
  • 20. MSDN Articles Introduction to Validation Rules in Visio Premium 2010 click http://msdn.microsoft.com/en-us/library/ff847470.aspx Creating Custom Validation Rules for Visio Premium click http://msdn.microsoft.com/en-us/library/ff797562.aspxBlogs 10 Days for Office 2010: 10 Visio 2010 Tips and Tricks click http://blogs.msdn.com/b/mvpawardprogram/archive/2010/05/13/10- days-for-office-2010-10-visio-2010-tips-and-tricks.aspx David J Parker click http://davidjpp.wordpress.com/