Author Topic: Orientation of the sub-shapes to the dynamic connector  (Read 797 times)

0 Members and 1 Guest are viewing this topic.

asfadel

  • Newbie
  • *
  • Posts: 7
Orientation of the sub-shapes to the dynamic connector
« on: August 01, 2020, 02:02:10 PM »
Hello, dear members of the forum!
I would like to make a dynamic connector for myself with labels on both sides and counterparts for circuit shape blocks. The connector described here https://visualsignals.typepad.co.uk/vislog/2015/04/building-a-labelled-dynamic-connector-in-visio.html was taken as a basis (thanks to John Goldsmith !). Now I changed everything I wanted, but I just cannot correctly orient the mating parts (subshapes - rectangles on both sides of the dynamic connector) and fix their sizes. In the attachment example "test", there is a dynamic connectors: "now" - what I have, "need 1" - "need 3" - how I would like it to be like.
Help me, please, how to solve this problem?
Sorry for my English, I hope you can understand me.

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #1 on: August 02, 2020, 04:20:22 AM »
Cross-post via Google Translate with some suggestions.
Sorry for my English, I hope you can understand me.
Don't worry, i am member of this forum about 10 years. I learn English in 1986-1992 in Moscow school and i was not good pupil  :)
« Last Edit: August 02, 2020, 06:07:51 AM by Surrogate »

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3822
  • Ideas Visio-lized into solutions
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #2 on: August 02, 2020, 08:49:24 PM »
What version of Visio are you using?  Since you provide a vsd file, it would seem you are using 2007 or older.  The link you provided  is based upon more recent Visio object model.  Some of the features used in the solution don't exist for older versions of Visio. 

It may be possible to put together something, but, it would take much more coding to work-around the lack of features...Hence my question.
Visio 2019 Pro

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #3 on: August 02, 2020, 10:51:04 PM »
Visio 2010 also use vsd-file format! In article John Goldsmith mentioned functions which was added in Visio 2010.
In Russian Visio forum I set preffered format:

May be our topic starter use there vsd-format according this rule?
« Last Edit: August 02, 2020, 11:41:24 PM by Surrogate »

asfadel

  • Newbie
  • *
  • Posts: 7
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #4 on: August 03, 2020, 12:49:00 PM »
Yes, quite right, it is Visio 2010 file format. All functions and features are working, except correct linking counterparts-rectangles to ends of dynamic connector. I tried to figure out how it works with labels, but nothing came of it.

JohnGoldsmith

  • Sr. Member
  • ****
  • Posts: 349
    • John Goldsmith's visLog
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #5 on: August 09, 2020, 09:49:27 AM »
Hi,
Good to hear the connector is proving useful.  At the moment I'm not quite clear on what the problem is.  Can you describe what behaviour you would like to see and what is not happening?
Maybe remove all of the shapes and masters so that we can get the simplest demonstration of the problem.  Can you demostrate with two rectangles and a single connector? (+ a description of what's (not) happening).

Best regards
John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

asfadel

  • Newbie
  • *
  • Posts: 7
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #6 on: August 09, 2020, 12:08:26 PM »
Thanks for quick reply, John!
The problem is, I can't figure out how to fill the sections "PinX(Y) and LocPinX(Y)" of the subshape-rectangles (fixed size 17.5mm x 5mm) at both ends of the dynamic connector. Rectangles should automatically track their position relative to blocks 1 and 2, and begin (end) strictly at the end of the connecting line. In the attached file, the dynamic connectors "correct 1" - "correct 3" are examples of how it should be, and "incorrect 1" - "incorrect 2" are examples of how it works now. That is, for any orientation relative to blocks 1 and 2, these subshape-rectangles must be inside these blocks.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3822
  • Ideas Visio-lized into solutions
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #7 on: August 09, 2020, 01:56:33 PM »
@Surrogate:  I don't think forcing .vsd is good idea.  If nothing else, it signals that newer version of Visio is being used and, therefore, a more updated object model. 

A better idea is to have the enrollment procedure request version of Visio, and have that displayed with each post.  I think that's much cleaner and more informative.
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3822
  • Ideas Visio-lized into solutions
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #8 on: August 09, 2020, 01:59:46 PM »
At JohnGoldsmith:  The other requirement, I believe, is for the rectangles to be hidden, based upon whichever end is not connected.  Perhaps the OP can clarify.
Visio 2019 Pro

asfadel

  • Newbie
  • *
  • Posts: 7
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #9 on: August 09, 2020, 03:08:30 PM »
To hide the rectangles I use EndTrigger and BegTrigger of the dynamic connector.

JohnGoldsmith

  • Sr. Member
  • ****
  • Posts: 349
    • John Goldsmith's visLog
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #10 on: August 11, 2020, 04:32:04 AM »
Thank you for the screenshot and further details - that's helpful in seeing what you're after.
A key part of this shape is deciding which side the label should be placed relative the the end point that its tracking.  This is done using the RECTSECT function which returns an integer ("0=zero (center), 1=right, 2=top, 3=left, 4=bottom").

Once you know where the label is placed your extra 'block' is going to want to sit in the opposite direction.  So I've added two new user cells in the group shape that translate the label postion:
User.Block_Start_Side = INDEX(User.Label_Start_Side,"0;3;4;1;2",";","0")User.Block_End_Side = INDEX(User.Label_End_Side,"0;3;4;1;2",";","0")
From there you can use those new values to calculate the LocPin postion (see image and file for details).
Best regards
John
 
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

JohnGoldsmith

  • Sr. Member
  • ****
  • Posts: 349
    • John Goldsmith's visLog
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #11 on: August 11, 2020, 04:36:31 AM »
I think I agree with you @wapperdude on file formats, particularly since the newer format allows you to see whether the file has code or not.
There's also the Visio Compatibility Pack for Visio 2010 to be able to open newer format file.
Anyway, I've attached the vsd in the previous post and I'll attach the same file in vsdx format to this one.
All the best
John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #12 on: August 11, 2020, 05:35:57 AM »
Hi, John !
There's also the Visio Compatibility Pack for Visio 2010 to be able to open newer format file.
Sorry, just now this hyperlink dont work ! Also this converter didn't work with Visio 2007 and more ancient versions.
I started thread at our Russian Visio forum 4 years ago. This converter works not for all, sometimes we need use it with command line !

The suggest to attach only vsd files was added in 2013, when many users used incompatible versions with vsdx! This was also topical in 2016.

JohnGoldsmith

  • Sr. Member
  • ****
  • Posts: 349
    • John Goldsmith's visLog
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #13 on: August 11, 2020, 06:18:26 AM »
Hmm, well it worked this morning but is clearly feeling unhappy now.....maybe it will come back later on.
Well I hear what you're saying and I wouldn't want to intentionally exclude anyone who's not able to be on the latest version - I'm just saying that in 2020 maybe the default should be vsdx and if a user only has access to vsd then by all means post that file instead.
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

JohnGoldsmith

  • Sr. Member
  • ****
  • Posts: 349
    • John Goldsmith's visLog
Re: Orientation of the sub-shapes to the dynamic connector
« Reply #14 on: August 11, 2020, 06:21:40 AM »
Sorry - forgot to add the screenshot of the connector...
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/