Author Topic: Control Handles with Lines  (Read 8666 times)

0 Members and 1 Guest are viewing this topic.

Gregory Jackson

  • Jr. Member
  • **
  • Posts: 55
    • Art Empowers WorldWide
Control Handles with Lines
« on: November 04, 2011, 04:22:26 PM »
I have a newly created element, I have added a control point (big deal) not real rocket science there. But What I want is that control handle to have a line attached to it like the default ethernet element. How can I get a line to attach to my control point?

thx,

~r
« Last Edit: November 07, 2011, 04:51:18 AM by Visio Guy »

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Control Handles with Lines
« Reply #1 on: November 04, 2011, 08:10:28 PM »
Basically, you need to add another Geometry section to the ShapeSheet.  This section is for your line to control point.

The new geometry section needs two entries, beginning point (1st line) & ending point (2nd line).

First line is a MoveTo
X Cell: enter the x position of the control point, something like Controls.Row_1.x
Y Cell:  enter some point on the shape, e.g., height*1

2nd line is a LineTo:
X Cell:  same entry as above
Y Cell:  is the Control point y position, e.g., Controls.Row_1.y.

That's it.

HTH
Wapperdude
« Last Edit: November 07, 2011, 04:51:36 AM by Visio Guy »
Visio 2019 Pro

Gregory Jackson

  • Jr. Member
  • **
  • Posts: 55
    • Art Empowers WorldWide
Re: Control Handles with Lines
« Reply #2 on: November 06, 2011, 12:27:42 PM »
That worked great for me but I wanted it to behave like the Ethernet segment element. When I looked at the shape sheet for the Ethernet it has no geometry section only control points and those control point  make right 90 degree bends. I tried to copy some if the formulas from the ethernet element butting getting errors.

Any recommendation.
« Last Edit: November 07, 2011, 04:51:44 AM by Visio Guy »

vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Control Handles with Lines
« Reply #3 on: November 06, 2011, 10:14:06 PM »
EN shape is a group

select the shape....right click....format....1st panel....change selection from group only to group first.....ok

select shape....find line of interest.....click on it....right click...shapesheet....the geometry section is there for just the line
note its picking info up from the parent (group...i.e. control points).

« Last Edit: November 07, 2011, 04:52:03 AM by Visio Guy »

Gregory Jackson

  • Jr. Member
  • **
  • Posts: 55
    • Art Empowers WorldWide
Re: Control Handles with Lines
« Reply #4 on: November 11, 2011, 03:00:13 PM »
Ok after struggling trying to manipulate and trick Visio I am once again raising my white flag.

I am trying to create a Visio element that works like the Ethernet element but is shaped like the basic shape pentagon. I looked at the drawing explorer at the Ethernet shape and it has three separate shapes and one group shape which is the actual lines. The other three shapes are the foreground, lines and fill for the Ethernet tube. And they are all grouped together.
I was able to delete the three elements that and just leave the lines, which was good I wanted to then take those lines and add the pentagon. This looks great and works but this does not really get me to a clean element. I have to group these two elements (pentagon and lines from the Ethernet element) and this does not give me the same functionality of the original Ethernet element. 

How do I get a pentagon with about 10 control points that functions like the original Ethernet segment? 

I hope I was able to articulate what I am trying o accomplish if anyone needs more information please don’t hesitate to contact me.


vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Control Handles with Lines
« Reply #5 on: November 12, 2011, 01:09:36 PM »
you need to manually stitch the pentagon control point references to the lines....see what I did in the scaled lines shape (group vs 1 of the lines)

I posted an example above...but it does seem to be there anymore...here it is again
Your post shows as a php file.


wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Control Handles with Lines
« Reply #6 on: November 12, 2011, 08:22:43 PM »
Here's update to previous file, with behavior that mimics the ethernet shape.  I only did one control point.  You would need a separate geometry section for each line / control point combination.

HTH
Wapperdude
Visio 2019 Pro

Gregory Jackson

  • Jr. Member
  • **
  • Posts: 55
    • Art Empowers WorldWide
Re: Control Handles with Lines
« Reply #7 on: November 17, 2011, 01:07:36 PM »
Thanks Wapperdude.. I cheated a bit and just changed the geometry of the the original etherenet element. So here is how I did it.

1. I viewed the element in the drawing explorer window
2. extracted/viewed all elements that make up the ethernet segment
3. deleted object I did not need
4. took the geometry of a pentagon from shape sheet applied them to the geometry of the only segment of the ethernet element
5. locked aspect ration in shape sheet and BAM!
6. I eventually deleted all of the control point that I did not need and saved my new stencil. It's a crude fix but it works.

I have one other question  for you (or anyone that can answer this) how do I lock the text in the pentagon so that is always remains black? I used the GUARD(RBG(0,0,0)) but that did not seem to work. When I applied a colored layer to the pentagon the text change color too. Is that a THEMEGUARD is should be using?

Thanks.

~r

Gregory Jackson

  • Jr. Member
  • **
  • Posts: 55
    • Art Empowers WorldWide
Re: Control Handles with Lines (Wapperdude)
« Reply #8 on: November 17, 2011, 07:18:04 PM »
I downloaded your Visio example you uploaded.. one issue I was able to create another control point thank you for that was a huge plus. there is one bug in though.. I tried myself to figure out what was going on but I was at a loss. I think it has to do with  Geometry2.NoLine  IF(AND(Controls.mc1.Y<Height*1,Controls.mc1.Y>Height*0),1,0).

What happening is that the line moves BUT if you try to make a straight line on the ends of the object once you reach Height*0.99 and -0.01 on the Controls Y axis  the line itself dissapears the control point is visible but the line is not? This behavior is consistent with the new control point I added.

BTW thank you for the formula help..

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Control Handles with Lines
« Reply #9 on: November 17, 2011, 09:12:50 PM »
The reason for hiding the line is to prevent it from showing on top of the shape.  The test needs to include the x-position of the control.  The formula becomes =IF(AND(Controls.mc1.Y<Height*1,Controls.mc1.Y>Height*0,Controls.mc1>0,Controls.mc1<Width),1,0)

Try removing the formula altogether, and you will see the undesired behavior when the control point is inside the shape.

One last bit of tidying up:  line 3 of the Geometry2 section, the formula for the Y-cell needs to be simplified to be controls.mc1.y.  This creates proper behavior when the control is at either end of the shape.

Wapperdude
« Last Edit: November 17, 2011, 09:24:09 PM by wapperdude »
Visio 2019 Pro

Gregory Jackson

  • Jr. Member
  • **
  • Posts: 55
    • Art Empowers WorldWide
Re: Control Handles with Lines
« Reply #10 on: November 20, 2011, 11:06:04 AM »
Thx wapperdude.. I got it working I appreciate your help.