Find out informations of a connected (glued) shape

Started by bernd, June 05, 2016, 12:40:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bernd

Hello all together..
another problem to solve :-) .. probably it is easy for you, but not for me  :-\

I have different rectangle shapes connected via connection shapes..
I "just" want to work with the connection shapes - but with some informations given in the rectangle shape connected to..

How can I find out within the shapesheet, what the connected rectangles shape (name) is?
In the section Glueinfo are different information.. i.e. BegTrigger and EndTrigger.. but how to seperate the shape-name?
Using stringhandles or something like that?

Perhaps someone could help me?
Thank you in advance for your support..

BR Bernd

JuneTheSecond

Best Regards,

Junichi Yoda
http://june.minibird.jp/

wapperdude

See attached file.  It generates an Excel file (or modify code to get a List Box).

The code has a lot of comments, so hopefully, it'll be easy to follow.

You do NOT have to select a shape to run the macro.

Wapperdude
Visio 2019 Pro

bernd

Hello folks,
thank you very much... unfortunately I didn´t mentionedth that I want to use the shapesheet, avoiding VBA.

Could it be so difficult to use the connection partners name of a 1-D shape (Begin) which is already given in the GLUE INFO?
(i.e. =_XFTRIGGER(Nutzer.4!EventXFMod) ---->  I need the string: Nutzer.4 
using a prop.value of the Nutzer.4 in the user-defined cells of my connection shape.

Sorry for forgotten that in the previous post.
Could you anyway help me?

BR
Bernd


JuneTheSecond

#4
I cannnot find out any Visio shapesheet  function that can get formula in a cell as a string.
If VBA, it is easy.



Option Explicit

Sub test()
    Dim shp As Visio.Shape
    Dim frm As String
    Dim subTxt As String
    Dim ShapeName As String
    Set shp = ActiveWindow.Selection(1) ' Connecotor must be selected.
    frm = shp.Cells("BegTrigger").FormulaU
    subTxt = Right(frm, Len(frm) - 11)
    ShapeName = Left(subTxt, Len(subTxt) - 12)
   
    Debug.Print ShapeName
End Sub


Best Regards,

Junichi Yoda
http://june.minibird.jp/

Surrogate

This article by David J Parker can help too
Quote from: David J Parker в статье Getting the Name of Glued Connection PointsA Visio developer asked me if it is possible to get the name of connection points that a connector is glued to in Visio. Well, it is not possible directly from the ShapeSheet, but is easy if you use a little code.