Interpreting the Command String

When an add-in (written in C, C++, VB, or other external Automation controller) is executed, a command string is sent to identify Visio as the environment that launched the application. The command string contains values that you can use to retrieve objects. This is in addition to any arguments you may have passed to your application. To access this return, use the Visual Basic function Command$() and then use Mid$() or StrComp() to parse the string.

Here is an example of a return string generated on a launch:

"/visio=<instanceHandle>/doc=<docIndex>/page=<pagIndex>/shape=<nameID>"

This example is the string sent when an application is run when a formula is evaluated in a SmartShape symbol's ShapeSheet cell. The ...

Get Professional Development with Visio® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.