Visio Guy

Visio Discussions => General Visio => Topic started by: Darryll on April 12, 2010, 10:59:15 AM

Title: Rotate Angle Connectors
Post by: Darryll on April 12, 2010, 10:59:15 AM
Quote from: wapperdude on June 22, 2009, 01:43:16 AM
Try these on for size.  The left one is a horizontal only version of the vertical only angled connector.  The right one is a universal implementation with no restrictions on the placement of the diamond.

Wapperdude
http://visguy.com/vgforum/index.php?topic=1031.0


I would REALLY like to understand how this Rotate Angle Connector works. I've looked through the ShapeSheet but when I try to recreate the same connector on my own, it doesn't work. I can't get the shapesheet functions to stick either. It keeps changing other values if I make changes in other cells.

My end goal is to create a 2,3,4 and 5 line rotate angle connector.

Does anyone have any ideas because your help is much appreciated!
Title: Re: Rotate Angle Connectors
Post by: Jumpy on April 12, 2010, 12:22:48 PM
Maybe this can help you. Just added two more Controls to get 2 more movable line segments.
The main smart part is only in the controls and geometry section
Title: Re: Rotate Angle Connectors
Post by: vojo on April 12, 2010, 01:22:17 PM
Not to rain on anybody's parade but if you really want see what can be done for something like this.....check out June the Seconds isometrics.
There is a wealth of knowledge there about this kind of thing!!!!
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 12, 2010, 01:42:57 PM
Jumpy,

Thanks! This is extremely helpful. I still have the main issue when creating the this type of connector. When adding in the information for the Geometry, the rows formulas don't stick. If I update one, it then changes the previous formula to a value in mm.

I'm not sure if there is a setting that I haven't configured yet or just plain ignorance. These are my steps:

1. Create a standard connector with the number of lines I need.
2. Update the Shape Transform information. (I don't have any user-defined cells. Is that section needed?)
3. Update the Geometry which is the main part but as I edit the next row, the previous row changes back to its original setting.

Nothing is being inherited as far as I can see.

@vojo: What or who is June the Seconds isometrics? Searching on Google hasn't yielded any results?
Title: Re: Rotate Angle Connectors
Post by: vojo on April 12, 2010, 01:48:00 PM
google  "visio isometrics"

http://yoda-e.hp.infoseek.co.jp/Piping_Isometrics/index.html

He goes by June the Second on this forum/website
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 12, 2010, 02:01:31 PM
This is pretty impressive but it doesn't meet my needs. The diagrams I'm creating aren't isometric diagrams but I will certainly use this to help with setting the angle that I require. The rotate angle example that was provided above by Jumpy is where I need to be heading. If you can offer any guidance as to why my Geometry formula entries aren't sticking, I would appreciate it.
:P
Title: Re: Rotate Angle Connectors
Post by: vojo on April 12, 2010, 02:08:03 PM
I was pointing out that in June's stuff are a lot of interesting algorithms for angled in shape routing.
If all you are looking for is some control points on a line (like the one submitted)...sounds good....June's stuff is way way way way overkill.
Title: Re: Rotate Angle Connectors
Post by: Jumpy on April 12, 2010, 02:31:12 PM
If u use the standard connector as a base for your shapes you should change the ObjectType cell (under misc. in the shapesheet) from 2 to ...say 0.
Because 2 signals Visio an automatic connector who's geometry section can be overwriten by Visio at will.

Otherwise I dont know, where your problem is. If you take my connector, go to the controls section an add another control.
Then go to geometry section (row before the last). Right mouse click: "Add line below" or sth. like that (I have german Visio).

The rows above should not change. In the new row put the reference to the new control, like in the rows above.

And that should be it.

@vojo: June the Seconds isometrics look really nice on the webpage. Didn't know about them before. But the free download isn't working. Hopfully June will see this post an change that? Pleaaase  ;)
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 12, 2010, 02:45:00 PM
Thanks Jumpy, I'll try this.

Also, the free download link doesn't work but if you go down to the bottom of the page and click on Downloads, that takes you to the page.
Title: Re: Rotate Angle Connectors
Post by: wapperdude on April 12, 2010, 02:49:33 PM
Connectors are somewhat unique, and have built-in functionality, e.g., the line ends connection points, but no "visible" connectors, the geometry propertry control for straight, right angle, etc.  Thus, it's difficult to make a shape that replicates all of these features.

Back to your original question, which might be taken two ways:
1.)  you want to add multiple "elbows", each manually positioned by a control point, or
2.)  you want to add multiple segments, originating from a common point, but having separate end points and each with it's own elbow.

Regarding (1):  open the shapesheet, then in the controls section, insert lines to create new controls.  Move to the geometry section, insert lines for as many control points that you want, and then replicate the "move to" entry, but insert a new control point.  (It helps if the control points are NOT overlapping.)

Regarding (2):  Create a pseudo group:  
1.)  Draw your first connector
2.)  Draw a 2nd connector
3.)  Then open the shapesheet of the 2nd connector, and use a "guarded" formula to make its Beginning point" to be the same as the 1st connector, e.e., BeginX = guard(Dynamic connector.3!BeginX) where "3" is the ID of the 1st connector.
4.)  Add controls to each shapesheet as desired.
5.)  Oh, and make each connector a "straight" connector
6.)  Change object type to "0" in the Misc section.  This probably should be done 1st in the shapesheet.

HTH
Wapperdude
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 12, 2010, 02:55:52 PM
All,

Thanks very much for all of your help today. I will try my hand at creating some of these so that I have a full understanding.
;D
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 12, 2010, 04:14:14 PM
Thanks! I got it working now. Going to read through some of the algorithms as well because I will need to set the angle for some of the mid-lines to make it easier for the diagrams I'm creating.
Title: Re: Rotate Angle Connectors
Post by: vojo on April 12, 2010, 04:40:00 PM
junes stuff
Title: Re: Rotate Angle Connectors
Post by: Jumpy on April 12, 2010, 08:11:45 PM
Thanks
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 13, 2010, 03:18:50 PM
This is kinda like a follow up question. I've been able to create the multiple connector types that I need. Works great and I've understood how the shapesheet and other stuff works. What I'd like to know is:
How do I set the angle for any one of the lines within my new rotate connectors?

E.g. Lets say I have a 2/3 line vertice connector,  how would I set one of them to always be at an angle of 85 degrees?
Title: Re: Rotate Angle Connectors
Post by: vojo on April 13, 2010, 04:15:44 PM
guard(85 deg) or use the gravity function
Title: Re: Rotate Angle Connectors
Post by: Yacine on April 13, 2010, 04:52:07 PM
it depends upon which of all the previously posted suggestions did you use.
Typically for a controls based configuration, you would bind the y position of the control point to a formula depending of x.
eg. BOUND(123,false,0,controls.row_1*sin(85deg),controls.row_1*sin(85deg)).
For more infos on the bound function, pse read this article (http://www.visguy.com/2006/12/14/constraining-angle-with-the-bound-shapesheet-function/).
Title: Re: Rotate Angle Connectors
Post by: wapperdude on April 13, 2010, 05:01:00 PM
It might be helpful if you post an example of your implementation.  There could several solutions/issues depending upon how you've structured things.

Wapperdude
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 14, 2010, 10:32:32 AM
I think I've come up with a possible solution. I've only been able to test it on the 2-line connector at the moment. Need to test the theory against the 3-5 line connectors.

I added an extra control point at the point of the angle to act as my 90 deg corner to make a triangle and used this on the Controls.Row_1.X entry:
(TAN(85)*((Controls.Row_2.Y-Geometry1.Y1)*0.5))/10

I've attached the stencil. I'm currently working on Connect 2. The test will be on the other line connectors. Is there a neater solution?

P.S. The Bound article was very helpful. Thanks!
Title: Re: Rotate Angle Connectors
Post by: vojo on April 14, 2010, 12:48:36 PM
Looked at stencil connector 2...what exactly are trying to do here?????

Seems like you are doing an awful lot for what appears to be a pretty simple action.

What does the second control point do?   (tip says repo text....but you have not tied the text transform to this control point).

Are you trying to do something like "if its not a right angle...stair step down / over to it"?   That is much more complex....with the key point being
that, without VBA, you would be limited to the number of stair steps (could set geometry for say 10 steps and spoof the values based on
some user cells that uses the angle to determine which steps are "visible"....it would be tricky in shapesheet but could be done).

I guess I am missing the point.....if all you are looking to do is to enforce a right angle (either in 2 or 3 or 4 leg connector) that can be done
pretty straight forward.
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 14, 2010, 12:53:55 PM
If you look at Connect 2&3, you'll get an idea of what I'm trying to create. I've also attached a pic of what I'm attempting. The 2-line connector works fine. When I try for 3, you'll see that the formula doesn't seem to want to work for the 3rd leg.
Title: Re: Rotate Angle Connectors
Post by: vojo on April 14, 2010, 02:46:26 PM
still dont see the point here???     Are you doing all this because you want a 5 degree slant???

What exactly can you not accomplish with the more std approach to such "elbows"???

You really should look at June's stuff!!!
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 14, 2010, 03:21:34 PM
The diagram is not a conventional diagram. It is being built to show high-level processes for management. Purely aesthetics. I've been doing the same thing but with grouped lines in the past but I'm trying to utilise Visio in a different way. the 5 degree slant looks aesthetically pleasing on a massive A0 print out when it is done. I just set all vertical vertices in my connector to 5 degrees. I understand the concept and have been able to do it for Connector 2 in the previously attached stencil but once I have more than 2 lines in the connector, the formula doesn't work anymore even though the trig formula is correct.
Title: Re: Rotate Angle Connectors
Post by: Yacine on April 14, 2010, 08:53:33 PM
Hi Darryll,
I am not sure, whether this is what you need and this post is quite long (sorry for my lazyness  8)), but I got playing with the figure shown on the left bottom corner of your posted screenshot...

...my connector should be enhanced with some hiding capabilities to allow the user to use less than the 5 connectors.
Also, you might want to let the user chose from a fixed angle and the free movable control point.

Let me know your opinion.

Yacine
Title: Re: Rotate Angle Connectors
Post by: Yacine on April 14, 2010, 09:08:22 PM
More esthetical than this and you're from the other border  ;). Sorry!
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 14, 2010, 09:32:59 PM
Thank you both for the examples and they are truly genius! I will certainly be taking the time to inspect the formulas behind them. The use of multiple Geometry Sections is a new one for me.

To better express what I'm trying to do and the reason why, I've attached a example image of what the final product looks like. There are multiple business units with multiple applications and multiple processes in the depiction showing their process flow which is why everything doesn't connect to each other. I hope this makes sense.
Title: Re: Rotate Angle Connectors
Post by: Yacine on April 15, 2010, 06:45:44 AM
So basically you are trying to replicate visio's connector tool, but sheared.

Check the attachment. What I did, was to draw a regular diagram, exported it and sheared it in the GIMP. that is so much easier.  :D

the background shapes however offer a lot of potential (see the visio file)
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 15, 2010, 07:01:54 AM
HAHAHAHAHAHAHAHAHA!!!  :D

Believe me when I say that I could do this quite easily in Photoshop (graphic app of choice).....but....
what I'm doing is creating a template stencil so that others can create these same kind of diagrams just using Visio. Its supposed to be created by Business users. If I was the only one needed to create these diagrams, I'd do in Photoshop. The 1st few I did were in Photoshop but that isn't the requirement.

Is there a way to do the same thing in Visio with such simplicity?
Title: Re: Rotate Angle Connectors
Post by: vojo on April 15, 2010, 01:48:14 PM
I am trying to hold back on this....but you really really really  need to look at Junes stuff.
You are better off tweaking his (change the angle from 30 to 5) than trying to build from scratch.

I know I have beat this to death...so wont chime in again
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 15, 2010, 02:12:18 PM
I'll check it out, but won't that mean there will be a white background to all of the connectors? With my multi-coloured backgrounds, I'm not sure how that will look. I'll have a play and see what happens.
Title: Re: Rotate Angle Connectors
Post by: vojo on April 15, 2010, 02:45:05 PM
A) its much easier to change the white background on those  (I made mine thinner to stuff)
B) with all the colors floating around...you will want wite out line in case is dark blue connector (or even black) on a really dark blue background

Honestly, there is a lot of usability issues you might want to think thru on this...especially if you build them yourself for others to use.
Title: Re: Rotate Angle Connectors
Post by: Jumpy on April 15, 2010, 02:49:09 PM
The problem, that vojo sees, is that you need to have a set of different connectors. There will be no universal connector to connect shapes from all directions. That would be to complicated to build. So instead to make that Connector-Set you'll need from scratch it might be easyier to use Junes stuff as a base to start from.

Just to try it out I bulid a 3-line connector (based on Yacines drawing) that you can use to connect From a shape (left/right/top/bottom side) to other shapes (but only left and right side).
It won't be possible to build a line around shapes, that you don't want to connect to and it was a difficult to create (look at the formulas)(needed 2 hours of thinking)(but was fun).

To get another line you need 1 more control point, 3 more user defined cells for calculations, and a new geometry section using the result of those calculations.
Title: Re: Rotate Angle Connectors
Post by: vojo on April 15, 2010, 02:51:16 PM
the possibilities...VSD is way too big for here...but this gives the idea
Title: Re: Rotate Angle Connectors
Post by: vojo on April 15, 2010, 02:54:28 PM
RE jumpy.....and June figured that all out via allowing connectors to attach to each other and track movement...
aka if you want 7 stair step connector....take 7 of them and attach end to end...group...and save in a stencil...pertinent ones will track to pertinent control points
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 15, 2010, 02:59:16 PM
Thanks. I'll give it a try. Its the best way to learn. :)
Title: Re: Rotate Angle Connectors
Post by: Yacine on April 15, 2010, 07:58:58 PM
Hi Darryl,
first of all let me leave a remark and then forget about it. I misliked your tone, that's not the way I expected to get an answer from you.  You have obviously not checked my posted attachments >:(

Now back to the problem:

1) I meant it seriously, when I recommended to shear the exported bitmap. As you'll have noticed from the many replies, what is needed is a universal connector and whilst Visio's is not perfect, it is still so sophisticated that you will most probably not surpass it. And be sure, that when you'll have presented your 5 points connector, the first user will ask  for a 6 points one.

So the idea, is to draw the diagram in regular visio manner and once finished, run a macro, that will export the file as bitmap image, run the image processing program with the files name and the script as arguments, transform the image and at will import on an additional page in Visio. That is a practicable way.

2) Now, as we enthousiastically play with your problem, why not approach it from another way - Still keeping in mind that visio's connector is very good and that it should be used for the task.
If you happen to be one of the lucky ones to work already with V2010 (I'm not  :'( ) , you have access to the vertices of your connectors.
Read this article (http://www.visguy.com/2010/02/09/text-along-a-connectors-path-in-microsoft-visio-2010/). With this info, you can hide the actual connector and draw the visible one with inclined lines for the vertical segments and horizontal ones, for the others.

3) Vojo suggests the use of groups of simpler "Yoda" shapes. That's very good.
Watch my post on duplicated shapes here  (http://visguy.com/vgforum/index.php?topic=1625.0)and here  (http://visguy.com/vgforum/index.php?topic=1598.0)that could be a feasable approach.
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 15, 2010, 08:27:08 PM
Quote from: Yacine on April 15, 2010, 07:58:58 PM
Hi Darryl,
first of all let me leave a remark and then forget about it. I misliked your tone, that's not the way I expected to get an answer from you.  You have obviously not checked my posted attachments >:(

Yacine,

I've reread all of my posts and I'm not sure of what tone you are referring to. If I have presented myself in any fashion other than thankfulness and gratitude for the help I have received from all posters, then I regret doing so. It was never my intention.
Title: Re: Rotate Angle Connectors
Post by: Yacine on April 15, 2010, 08:37:34 PM
QuoteHAHAHAHAHAHAHAHAHA!!!  Cheesy
I left this morning 15 min too late for work, because I wanted to show you my thoughts ;) and was accordingly disapointed, when I read your answer.

Peace  ;D
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 15, 2010, 08:43:49 PM
The laugh was meant to show that I loved the genius and simplicity of the image shear idea.  ;D
Title: Re: Rotate Angle Connectors
Post by: Yacine on April 16, 2010, 06:23:47 AM
Mon Oeil.

New trial?
Those are Junichi's isometric bows in a group.
You'll notice that the arrow of the last line needs to be set manually by "double single clicking"  ;) the last segment. Setting the arrow for the whole group will set it to all the segments. It seems like I discovered a visio bug here. Refering to the endarrow property of an other shape returns 0! Or am I doing something wrong?
2nd: A lot of BOUNDs and IFs would be necessary to avoid the ugly overlaps, when a control point leaves the area between it's 2 neighbours.

Enjoy.
Title: Re: Rotate Angle Connectors
Post by: Yacine on April 16, 2010, 06:47:30 AM
had to add this one. ... I know it's silly. ;D
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 16, 2010, 06:51:22 AM
Incredible! I like the artwork!

Will be spending the rest of the day investigating the functions and techniques used to create this. Thanks!

How do I make the ends of the connectors snap to the objects?
Title: Re: Rotate Angle Connectors
Post by: vojo on April 16, 2010, 12:54:25 PM
they snap to any connection point you approach.   And much more importantly, if you move a shape with a connection point that this attaches to, the connector
follows and scales as appropriate (you can use the control handle to adjust after you move it if you need to).

So for the picture I included, in the blade and switch shapes, there arrays of connection points.   So the following works well
- drop a blade
- drop a switch
- drop a connector
- attach one end to blade...other to switch
- use control to set the middle span as appropriate (I did not just get lucky with all that "traffic" in the middle)
- format as you see fit.
- move blade or switch as needed...connector tracks to it....repeat the control step as needed

Like I said, there is a real wealth of knowledge in those shapes
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 16, 2010, 01:17:11 PM
Quote from: vojo on April 16, 2010, 12:54:25 PM
they snap to any connection point you approach.   And much more importantly, if you move a shape with a connection point that this attaches to, the connector
follows and scales as appropriate (you can use the control handle to adjust after you move it if you need to).

Are you referring to the example provided by Yancine? The ends Snap to Geometry but they don't stick the object handle. If you move the object, it doesn't move with it.
Are you referring to another example? :-\
Title: Re: Rotate Angle Connectors
Post by: Jumpy on April 16, 2010, 02:43:53 PM
You have to enable glueing to object handles global for the drawing.
Title: Re: Rotate Angle Connectors
Post by: Darryll on April 16, 2010, 02:49:24 PM
Thanks. That worked. Not sure why it wasn't enabled.  :-\