Author Topic: Find out informations of a connected (glued) shape  (Read 2670 times)

0 Members and 1 Guest are viewing this topic.

bernd

  • Newbie
  • *
  • Posts: 5
Find out informations of a connected (glued) shape
« on: June 05, 2016, 07:40:12 AM »
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

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Find out informations of a connected (glued) shape
« Reply #1 on: June 05, 2016, 06:29:22 PM »
I recommend you to study about connect object.
I feel not easy for me to understand it.
https://msdn.microsoft.com/en-us/library/office/ff768985.aspx
Best Regards,

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

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3455
  • Ideas Visio-lized into solutions
Re: Find out informations of a connected (glued) shape
« Reply #2 on: June 05, 2016, 07:34:59 PM »
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

  • Newbie
  • *
  • Posts: 5
Re: Find out informations of a connected (glued) shape
« Reply #3 on: June 06, 2016, 09:00:32 AM »
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

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Find out informations of a connected (glued) shape
« Reply #4 on: June 07, 2016, 02:13:27 AM »
I cannnot find out any Visio shapesheet  function that can get formula in a cell as a string.
If VBA, it is easy.

Code: [Select]

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


« Last Edit: June 07, 2016, 06:05:32 AM by JuneTheSecond »
Best Regards,

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

Surrogate

  • Hero Member
  • *****
  • Posts: 892
    • ShapeSheet™ Knowledge Base
Re: Find out informations of a connected (glued) shape
« Reply #5 on: June 07, 2016, 02:30:54 AM »
This article by David J Parker can help too
A 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.