BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Global variable list

Started by Thomas Winkel, January 26, 2014, 04:48:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thomas Winkel


attached an example for a shape with a variable data field.
As new data is added to one shape it will directly be available via drop-down menu from the other shapes.

This is achieved by a User defined cell:

AddName() is very simple:

Sub AddName(shp As Visio.Shape)
    ActiveDocument.DocumentSheet.Cells("Prop.Names").Formula = Chr(34) & shp.Cells("Prop.Name.Format").ResultStr(visNone) & Chr(34)
    shp.Cells("Prop.Name.Format").Formula = "=TheDoc!Prop.Names"
End Sub

The list is stored in a document property "Names".



It's a very special case in which you would need your solution.
Usually, I'd just require the user to edit the list in the page's properties window.
but nicely done nevertheless.

Thomas Winkel


my use-case would be electric terminals in a schematic drawing (Name -> Signal).
But at the moment this is just an experiment for fun to test the DEPENDSON() function which I discovered a few days ago.
There are ways to destroy the global list. So probably I will never use this in my project.
Anyhow, its really fun to develop such little things in Visio, more than Excel VBA.

Btw. today I've read your comic strips. "This is because *crazy mathematics*"... So funny, thanks for sharing  ;D

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 178 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1031KB.
Tokens: post-login.
Cache hits: 13: 0.00179s for 26,766 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]