|
Visio
2002® Developer's Survival Pack |
Home
VXDSP
This page |
Table of Contents
Part 1: Overview Of The Visio Development Environment 17
- Chapter 1: Introduction 19
- Programmable Diagramming: Enter Visio 20
- The Development Challenges 20
- Who This Book Is For 21
- What This Book Covers 22
- What This Book Does Not Cover 22
- Caveat: This Book Is Probably Wrong! 22
- Companion Website for Tools, Samples, Updates 23
- Visio Version Information 23
- Acknowledgements 23
- Chapter 2: Overview of Visio Territory 25
- The User's View 25
- The Developer's View 26
- Generic Solution Structure 26
- At the Heart 26
- Automation 26
- Added Functionality 27
- Connections To Data 29
- Example Scenarios 30
- First Look At Visio Structure 30
- "Model + View + Controller" Structure 32
- Document Types and Roles 33
- Where The ShapeSheet Environment Fits In 33
- ShapeSheet Heavily Used In Automation Too 34
- The Automation Environment 34
- Visio Model vs. Solution Model 35
- From Here 36
- Chapter 3: A Plan For Coping 37
- Planning Your Course Of Study 37
- Preparation 39
- Developing Visio Solutions Book ("DVS") 39
- Multiple Monitors 39
- Get Comfortable With VBA 39
- Visio 2002 Developer's Survival Pack Browser Tools 40
- Events Browser 40
- UIObjects Browser 40
- CommandBars Browser 40
- Inheritance Browser 40
- XML Browser 40
- Bulk VS?-to-XML Converter 40
- Visio.bin Browser 40
- Download and Installation 41
- Visio 2002 Developer's Survival Pack Utilities 41
- VB-to-VSL Adapter Component 41
- Registration Tools 41
- Other References and Support 41
- Books 41
- Newsgroups 41
- Websites 41
- More Visio Tools 42
- Preliminary Visio and VBA Skillset 42
- Preliminary User-level Visio Activities 42
- Some ShapeSheet Activities 43
- Preliminary Developer-Level Activities 43
- From Here 44
Part 2: Visio Structural Breakdowns 45
- Chapter 4: Visio Object Model 47
- Expanded Object Model 47
- Objects with Cells 49
- Collections Versus Individual Objects 49
- User Interface Objects Shown Abbreviated 49
- Layer Objects 49
- Relationship To DVS and Poster Object Models 49
- Browsable Object-Property-Method Tables 49
- Tools for Object Model Browsing 50
- Visimation Xpose 50
- VBA Object Browser 51
- VBA Locals Window 51
- XML Browser 52
- Additional Tools 52
- From Here 52
- Chapter 5: ShapeSheet Structure and Functions Introduction 53
- Orientation 53
- Complete Automation Understanding Must Include Cells ! 53
- ShapeSheet-Environment Covers "Content" Branch of Object Model
54
- ShapeSheet Organized as Sections, Rows and Columns 54
- ShapeSheet Section-Row-Cell Reference Tables 56
- ShapeSheet Orientation Continued 56
- "All ShapeSheets Behave the Same" 56
- How the ShapeSheet Applies to Diagram Shapes 56
- Objects Which Contain Cells Via Dummy Shapes 57
- Objects Which Contain Cells Directly 57
- ShapeSheet Sections and Rows 58
- Varying Section-Row Structures 58
- Sections and Rows vs. Objects 60
- ShapeSheet Formulas and Functions 60
- From Here 62
Part 3: Visio Functional Areas In Depth 63
- Chapter 6: Visio Files: Drawings, Stencils, Templates 65
- Top Concepts 65
- Organizing Our Overview 66
- Use XML Browser 67
- File Relationships 67
- Drawing File Point-of-View 67
- Drawing File With Stencil 68
- Template file 69
- Summary of Roles of Document Components 71
- Silly Visio File Tricks 71
- File Architecture Implications 71
- Developing Masters and Styles 72
- Where To Put VBA Code? 72
- From Here 72
- Chapter 7: Shapes 73
- Comfort First 73
- Shapes and Masters 73
- "Hello World" via Automation and VBA 74
- Single Shape Type, Distinguishing Attributes 74
- Shape Features Overview 74
- Identity and Name 76
- Coordinate Space and Alignment Box 78
- Coordinate Space 79
- One-Dimensional Shapes (Connectors) 80
- Alignment Box 80
- Selectively Enabling/Disabling Various Geometry-Controlling Features 82
- Geometry and Geometry Attributes 82
- Geometry Row Types. 82
- Geometry Attributes 83
- Geometry-Related Formatting 83
- Adjusting Feature Positions: Controls 83
- Text 84
- Text Position 84
- Text Appearance 84
- Useful Text Idioms 85
- Fields: ShapeSheet Values to Text 86
- Text To ShapeSheet: SHAPETEXT( ) 86
- Text To ShapeSheet Value: EVALTEXT() 86
- Setting the Text from the ShapeSheet 87
- Selectively Enabling/Disabling Text Behaviors 87
- Character Section: Controlling Text Format 87
- Studying Visio's Supplied Stencils and Templates 88
- From Here 89
- Shapes With Member "Sub-Shapes" (Group Shapes) 89
- Connectors, 1-D Shapes 89
- Glue, Connections and Connection Points 89
- Solution-Specific "Data" 89
- Styles and Masters 89
- Layers 89
- Right-Click Context Menu: Actions 89
- Events 90
- Foreign Objects 90
- Hyperlinks 90
- Chapter 8: Masters and Shapes 91
- "Master" versus "Shape Instance" 91
- Master-To-Shape and Shape-To-Master 92
- Starting From the New Master Command 92
- Starting From Drawing Page 92
- Stencil File versus Document Stencil 93
- Instances Are Always Created From Local Stencil 94
- Master Matching Alternatives 94
- Development Implications 94
- Other Wrinkles 95
- From Here 95
- Chapter 9: Some ShapeSheet Practicalities 97
- ShapeSheet Cell Reference Syntax 97
- Finding Out Cell Names 98
- Universal and Local Row and Cell Names 98
- Which Names Are Which? 99
- ShapeSheet Calculation Dependencies 100
- Cells Set Multiple Ways 100
- Monitoring Recalc Loops 102
- Keys To Solution 102
- Trickier Example 102
- To REALLY Break A Loop 103
- Twin Peaks Example 103
- Flaky Recalculation Problems 104
- The DEPENDSON( ) Function 105
- Guard( ) Function Revisited 107
- ShapeSheet Cell Types and Units 107
- Internal Numeric Value versus Output Appearance 107
- "Magic" X, Y Extraction 108
- Assumed Units 108
- Formula Change Tracking 108
- XML Files Handy for Studying 109
- From Here 109
- Chapter 10: Composite Shapes Using Groups 111
- Group Structure 111
- Group As Holder Only 111
- Group As Shape With Sub-Shapes 112
- Member Coordinate Space 113
- Group Behavior Variants 114
- Resize Behavior 114
- Add On Drop, a Very Promising Feature 115
- Controlling The Alignment Box 116
- Controlling Formatting 116
- A Composite Shape Example 117
- Structure 117
- Behavior 118
- ShapeSheet 118
- Editing The Structure With VBA Functions 120
- Embellishments 123
- Protection/Enablement Issues 124
- Composite Shapes: Ready To Deploy? 124
- Form-Style Text Behavior 125
- Navigation 125
- Text Clipping 126
- From Here 126
- Chapter 11: Connectors, Routing and Layout 127
- Plan of Attack 127
- Connectors Using Ordinary ShapeSheet Features 128
- 1-D Coordinate Space 128
- Straight Connector 129
- Curve Connector 130
- Right Angle Connector 130
- Shortcomings 131
- Universal Connector 131
- Further Caveats 134
- Summary of Simple Connectors Implementation 134
- Dynamic Layout Services 135
- Overview of Dynamic Layout Services 135
- Basic DLS Participation Eligibility: ObjType 136
- Dynamic Layout Services Details 137
- Routing 138
- Connector "Appearance" 139
- Line Jumps 139
- Plowing 139
- Layout 140
- Dynamic "Walking" Glue 141
- Page-level DLS Disable: DynamicsOff 141
- Dynamic Connectors 141
- Dynamic Connector Geometry 142
- Implications For Geometry Dependents 142
- Text Pin 143
- Connection Points 143
- Control Points 144
- Enable/Disable Dynamic Connector Functionality 144
- Some Dynamic Connector Developer Issues 144
- Alternative Solutions to Fancy Routing 147
- Dynamic Layout Performance Hints 149
- Comparison of Connector Strategies 150
- From Here 151
- Chapter 12: Glue and Connects 153
- Orientation 153
- What Glues to What 155
- Glue In Action 155
- Initialization 155
- How Gluer Depends on Gluee 157
- Control Point to Connection Point 157
- Connector Endpoint to Connection Point 157
- Connector to "Shape": Dynamic or "Walking" Glue 157
- Various Parts to Guide Lines 158
- Visio's Gendered, Directional Connection Points 158
- Factors Affecting User Operation of Glue 161
- Enhanced Snap and Glue Control in Visio 2002 161
- Lock/Guard Glue Formulas 162
- Connections To/From Group Member Shapes 163
- Some Glue Issues 163
- Dynamic Glue (_WALKGLUE) Issues 163
- Connects Objects: Reporting On Connections 163
- Connects Just Reports on Cells 164
- Some Connections Report As Two Connect Objects 164
- Other Notes 164
- Temporary Connection Points 164
- From Here 165
- Chapter 13: Formatting Via Masters and Styles 167
- Mastering Master Concepts 168
- Copying versus Inheritance 168
- The Initial Master-Instance Relationship 168
- Verifying Inheritance/Local Behavior 169
- Creating and Removing Local Override Formulas 170
- Severing Master-Shape Inheritance 170
- Master Identity and Names 170
- Styles-The Basics 170
- Style "Attribute Sets": Three Sets of Cells 171
- Style-to-Style Inheritance 172
- Master and Style Inheritance, Together At Last 172
- Inheritance Browser 174
- Three "Sub-Style" Attribute-Sets Versus Overall
"Style" 174
- Applying a Style 174
- Applying a Style Switches Inheritance For Entire Attribute-Set 175
- Applying a Local Formula or Value to a Cell 175
- Does "Apply Style" Beat Guard() and LockFormat? 175
- Reverting a Section or Cell to Inheritance 176
- Un-Applying a Style (Revert to Inheritance-from-Master) 176
- Style Collisions 176
- Style Philosophy and Application 177
- Styles as Named Sets of Attribute-Values 177
- Styles for Conveying Semantics 177
- The Evil "Color Scheme" Add-On 177
- Rethinking the Motivation 178
- Style Miscellany 179
- Seemingly Superfluous Sections? 179
- Some Development Implications 179
- Incomplete Inheritance Visibility 179
- The Need for Tools 180
- From Here 180
- Chapter 14: Line and Fill Patterns and Line Ends 181
- Relationship Between Pattern Masters and Instances 181
- Line Pattern and Line End Miscellany 183
- Creating Unscaled Line-Ends 183
- Line End Sizing Ratios 184
- Line Pattern and Line End Positioning 185
- Other Wrinkles 186
- From Here 186
- Chapter 15: Layers 187
-
Orientation 187
- Layer Structure And Behavior 188
- A Page's Layers Versus the Layers Object 188
- A Shape's Layer Membership 188
- Adding/Deleting Layers 188
- Assigning Shapes to Layers 188
- Using Layers 189
- Layers For Shape Data Attributes and Querying 189
- Querying Made Feasible 190
- Layer Control Tricks 191
- From Here 191
Part 4: Building Visio Solutions 193
-
Chapter 16: Building Solutions: Introduction 195
- Overview 195
- Alternative Solution Forms 196
- Implications 198
- Angle of Upcoming Solution Topics 199
- Different Visio Roles, Different Forms of Solution 199
- Visio for Rendering/Output 199
- Visio for Information Capture 200
- "Discipline-Specific Drawing Environment" 200
- Discrete Operations on Drawing 201
- Adding Intelligence to Shapes: "Shape Services" 201
- Adding Intelligence to Drawings: Drawing-wide Semantics 201
- Drawings as Views of Models 202
- Visio as Control Panel 202
- From Here 203
- Chapter 17: The "User Interface" Functionality 205
-
Orientation 205
- Two User Interface Models to Choose From! 206
- Study Sequence 206
- Overview of UIObject-Based Object Model 207
- Items 207
- "Groups" of Items 207
- "Sets" Handle "Context" 207
- Extent of User Interface Data 209
- Three "Levels" Of UI Customization 209
- UIObjects: Messy Details 210
- UIObject Browser: Completing the Picture 211
- Overview of CommandBars-Based UI Object Model 211
- Visio's Use of CommandBars 212
- CommandBarControl Events 213
- CommandBar Browser 214
- Document-Specific CommandBars? 214
- UIObjects and CommandBars, Together At Last 215
- UIObject-Based Model to CommandBars 215
- CommandBars to UIObject-Based Model 217
- Implications for CommandBarControl Events 218
- Usability of CommandBar Model 218
- General UI Strategy Using the UIObject-Based Model 219
- Constructing a Custom UI 219
- Working With The Active UI 220
- Persisting and Instating a Custom UI 221
- Don't Forget ShapeSheet Actions Section! 223
- Wrinkles 223
- Potentially Confusing UIObject Names 223
- Persistent Events on Most Visio Templates Causes UI Confusion 223
- Disappearing Toolbar Items 224
- Example UI Exercises 224
- Adding UI Elements 224
- Minimal UI 226
- From Here 227
- Chapter 18: Events and Other Notifications 229
-
Overview 229
- Several Different Event Mechanisms 229
- Where To Put The Code? 231
- Event Persistence 231
- Notifications from ShapeSheet Activities 231
- CALLTHIS 232
- RUNADDON 233
- RUNADDONWARGS 235
- Dedicated Event Cells 235
- Automation Events Overview 235
- Spectrum of Events Exposed 236
- Event Filters 236
- Document Events 236
- WithEvents Event Handling 237
- WithEvents Overview 237
- Code for WithEvents: Simple Case 238
- "Forgetful" VBA? 239
- Example With Model 239
- Code for WithEvents: More Realistic Case, Using Class Module 239
- Further Issues 242
- Events Via EventList.Add and AddAdvise 243
- EventList.Add 244
- EventList.AddAdvise 246
- Simple Event Sink Example 247
- Event Sink with Forwarding 248
- Persistence 249
- AddAdvise Compared To WithEvents 249
- EventList Interacts With WithEvents 249
- Filters 250
- Miscellaneous Issues 252
- NoEventsPending versus VisioIsIdle 252
- BeforeXXX Events 253
- VB/VBA Issue With Signed Two-Byte EventCode Values 253
- Event Support That Visio Lacks 254
- From Here 254
- Chapter 19: VBA-Based Solutions 255
-
Overview 255
- The Modules of a VBA Project 256
- Cross-Project and ShapeSheet-to-Project References 259
- Project Names 261
- Be Aware of VBA Project Behavior Options! 261
- Getting Rid of a VBA Project 262
- Where To Put Solution Code 262
- Put VBA Code In Stencil 263
- Solution-In-Stencil Gotchas 264
- Benefits and Drawbacks of VBA-Based Solutions 266
- From Here 266
- Chapter 20: Visio Solution Library Solutions: VSLs and Addons 267
-
Overview of VSL Features 268
- The VSL API 268
- The Visio-to-VSL Conversation 269
- Introducing the VBVSL_Adapter 270
- Overview of VBVSL and Adapter 270
- Minimal "VBVSL_Min" Example 271
- IVBVSL Interface Details 271
- Fulfilling the Needs of VBVSL.cls 274
- Structure For More Complex VSLs 278
- Breaking Down Functionality By Addon Or "Command"? 279
- Installation, Registration and Uninstallation 280
- VSL/Addon Registration With Visio 280
- Visio.bin Utilities 281
- VSL Unregistration 281
- Additional VSL Installation Considerations 282
- Summary of Benefits and Drawbacks to VSLs 282
- Benefits 282
- Drawbacks 283
- From Here 283
- Chapter 21: Exe and Out-of-Process Solutions 285
-
Out-Of-Process Concerns 286
- Integration With Visio 286
- ReflectArgs Exe Example 287
- Conclusions 289
- From Here 289
- Chapter 22: COM Addin Solutions 291
-
COM Addins Overview 291
- COM Addins In Visio 292
- Conclusion 293
- From Here 293
- Chapter 23: Solution Window Management 295
-
Out-of-Process vs. In-Process Windows 295
- Default Visual Basic Form Behavior 296
- Modal Form 296
- Modeless Form 296
- Coordinating modeless windows with Visio 296
- Plain Desktop window 297
- Plain MDI Child window 299
- Anchor window 300
- Stencil window 304
- From Here 305
- Chapter 24: ShapeSheet Service Addons 307
-
Event Lifetimes and "ShapeSheet Services" 307
- ShapeSheet Services Pattern 308
- Demo ShapeSheet Services Sample 308
- Main ShapeSheet Services Concepts 309
- "Demo ShapeSheet Services" Sample 309
- I-Am-Selected Service 310
- Supporting Utility Functions 313
- Connect Count Service 314
- Navigation Keys Service 315
- Further Notes on Demo ShapeSheet Services Sample 316
- Conclusions 317
- From Here 317
- Chapter 25: Visio and XML 319
-
Visio 2002's XML Features 319
- Making Sense of XML 320
- What XML Looks Like 320
- It's A Document, No Wait, It's A Database, No Wait... 321
- MSXML 321
- XSL and XSLT 322
- Schemas 322
- Namespaces 323
- Hands-On "XML for Visio" 324
- Studying VDXs To Learn Visio Structure 324
- "XML for Visio" for Hard-to-Fix Fixups 325
- SolutionXML Examples 325
- Processing "XML for Visio" Files 328
- Ideas 328
- Using MSXML to Iterate Through All Nodes 329
- View 329
- Change: Re-Mastering Shapes 331
- Let MSXML Do The Walking: XSL Patterns and XPath 331
- Visio XML Straight To HTML, in Code 332
- Visio XML Straight To HTML, in Browser 333
- Wrinkles 334
- Generating XML for Visio 335
- From Here 338
- Chapter 26: Visio and ActiveX 339
-
Using Ordinary ActiveX Controls in a Visio Document 339
- Dynamically Adding ActiveX Controls to Drawing 340
- Documents Linked/Embedded In Visio 341
- Visio ActiveX Control? Not Quite: Visio Embedded 342
- WebBrowser-Based Demo 342
- Accessing Visio from Within an "ActiveX Shape" 344
- From Here 347
- Chapter 27: Common Solution Techniques 349
-
Drag And Drop to/from Solution Windows 349
- Persisting Solution Data 355
- Text In Cell 355
- XML 355
- VisXData and IStorage 355
- When to Persist 357
- Undo 357
- Bitmap Import and Export with Visio 359
- Internationalization: Universal versus Local Names 360
- Document Protection 361
- Paths and Curves 361
- Registry 362
- Version Info 362
- From Here 364
Part 5: Browsable Reference to Visio Structure 365
-
Chapter 28: ShapeSheet Section-Row-Cell Structure 367
- Reading The Tables 367
- Constants 367
- Finding The Section Of Interest 368
- Chapter 29: ShapeSheet Functions 387
-
Chapter 30: Visio Objects, Properties and Methods 395
-
Object/Property/Method Table Organization 395
- Object Summary Table 398
- COM-Related Columns 398
- Event DispInterfaces 398
- Chapter 31: Events Table 459
Index 463
Article Created: 2001-07-01 Last edit: Last edit: 01-07-26 Graham Wideman
Go to: DiagramAntics.com