Visio Guy

Visio Discussions => Programming & Code => Topic started by: perry59 on October 14, 2016, 03:27:42 PM

Title: can shapesheet connection name be dynamically changed?
Post by: perry59 on October 14, 2016, 03:27:42 PM
Kinda hard to explain, but I'll try (attached drawing which makes it pretty clear).
I have a grouped object which represents a portion of a terminal strip. This portion has 3 "incoming" connections and 3 "outgoing".
The designators for each connection can be changed via double clicking the group and bringing up its data.
when I attach a connector to one of these connections, I want to be able query the connector to find out what terminal it is attached to. This normally would be fairly easy, however since the terminal names can be changed I run into problems.
the crux of it is, if the terminal name changes, how can I get the connection point name in the shapesheet to take that value?
i.e. "connections.input" would change to "connections.B" or whatever the terminal name changed to.
is this possible, or do I have to come up with a totally different approach?
Thanks!
Title: Re: can shapesheet connection name be dynamically changed?
Post by: perry59 on October 16, 2016, 01:50:34 AM
never mind. I physically moved the connection points to the group shape itself and it made querying a lot simpler. then I just put some custom props in the shape with the same name as the connection points and read those.
Title: Re: can shapesheet connection name be dynamically changed?
Post by: wapperdude on October 16, 2016, 02:24:23 AM
You can change the connection row type, to named, I think.  That allows you to assign a name to each connection point row and to add some text to the "d" cell.  That ought to save adding extra properties.

Wapperdude
Browser ID: smf (is_webkit)
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 1: index+Modifications.english (default).
Style sheets: 0: .
Hooks called: 46 (show)
Files included: 25 - 925KB. (show)
Memory used: 773KB.
Tokens: post-login.
Cache hits: 6: 0.00109s for 22,291 bytes (show)
Cache misses: 1: (show)
Queries used: 8.

[Show Queries]