Author Topic: Making a triangle respond to... Shapesheet question here...  (Read 17428 times)

0 Members and 1 Guest are viewing this topic.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Making a triangle respond to... Shapesheet question here...
« Reply #15 on: December 19, 2008, 05:13:10 PM »
Ah.  For the horizontal expansion, you need to grab the edge of the selection box that is coincident with the triangle's opposite edge (vertical leg).  If you grab the edge of the selection box that is coincident with the left vertex, then the behavior will be weird as you've observed.
Visio 2019 Pro

jamtart

  • Jr. Member
  • **
  • Posts: 67
Re: Making a triangle respond to... Shapesheet question here...
« Reply #16 on: December 19, 2008, 05:47:05 PM »
Ahh, that works very nice wapperdude. I will see if I can muster the info from the shapesheet of yours and use it in mine. Wish me luck, still a real newbie to shapesheets...

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Making a triangle respond to... Shapesheet question here...
« Reply #17 on: December 19, 2008, 06:12:01 PM »
Let me know, I'll walk you thru it if necessary.  If you prefer, you may email me directly, I think it's listed.
Visio 2019 Pro

jamtart

  • Jr. Member
  • **
  • Posts: 67
Re: Making a triangle respond to... Shapesheet question here...
« Reply #18 on: December 19, 2008, 06:22:00 PM »
Aurgh!! This should work. I put =GUARD('Rt. triangle: 2 legs'!Height-'Rt. triangle: 2 legs.2'!Height)in the Height box (no need to put anything in the width box I think) and Height*1 mm in the LocPinY box, it all seems logical but the whole resultant triangle moves up and down as I adjust the vertical components of either of the other two triangles, not just the resultant vertical as desired. I thinks I am very close. Here is a simplified version of what I started. :(

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Making a triangle respond to... Shapesheet question here...
« Reply #19 on: December 19, 2008, 08:12:27 PM »
Well, I haven't gone thru all of the shapesheets, but, for the blue triangle here's a few things.  First, some background.  Visio shapes are based upon width and height parameters.  Shape coordinates are relative and specified in terms of width and height.  The location on a page is specified by PinX and PinY.  The shape is anchored to these coordinates by LocX and LocY definitions.  Check out Visio Guys Artpage, http://www.visguy.com/visio-art/, and look at the entry for Pin and LocPin Illustration.  There's a zip file that might be of interest.  Next, although this isn't really correct, the Shape Transform section is sort of like the selection box section.  It defines the specific page location/size bounds for the shape.  The Geometry section defines the shape details.

For the blue triangle, which is controlled by the other two triangles, you pass information into the Shape Transform section, but not into the Geometry section.  That's why the blue triangle shifts rather than grows--nothing changes in the geometry section.  Also, you set the height of the blue triangle by a control point, again, negating any reference to the other triangles.

Study my file and the shapesheets.  You can right click the shapesheet to toggle between values and formulas.  Change the shapes and watch which entries change and which don't, and look at the formulas to see why.  Using the control points on the two triangles is fine, just not on the 3rd.  The use of the 1D shape is unnecessary, but, for a teaching tool, it does put things into more of an X-, Y-coordinate definition rather than width, height.  But it does compound your task.  Multiplying the height*1 mm is more of a scaling thing, and unnecessary once you resolve all of your geometry / shape transform issues.

One other note, if you select an entry in the Geometry section, it will be highlighted (usually black square), in the drawing.

HTH
Wapperdude
Visio 2019 Pro

joemako

  • Jr. Member
  • **
  • Posts: 40
    • Joe Mako
Re: Making a triangle respond to... Shapesheet question here...
« Reply #20 on: December 19, 2008, 09:14:11 PM »
With the original file you uploaded, for each triangle looking shape (they are not normal triangles, they are 1-D shapes that are drawn from shapesheet calculations), I right clicked and selected "Format" -> "Special" from the menu, and changed the name to Green, Blue, and Gray (I could not figure out how to deal with spaces in a shape name [now I see, a single quote :) ]).

In the shapesheet for the blue triangle, under the section controls, I changed the value for Y in Controls.Row_1 to "=(Green!Controls.Row_1.Y + Gray!Controls.Row_1.Y)" without the quotes.

So that now, -85.95 Vars + 62.05 Vars = -23.90 Vars (in how it was drawn).

I also when ahead and connected the total watts measurement to the triangles.


The next issue is the angle measurement for the blue triangle flipping from inside to outside, when the Vars is positive.
« Last Edit: December 19, 2008, 09:29:24 PM by joemako »

jamtart

  • Jr. Member
  • **
  • Posts: 67
Re: Making a triangle respond to... Shapesheet question here...
« Reply #21 on: December 19, 2008, 09:33:36 PM »
This is just perfect, I was wondering how to change the names of the triangles too. Thanks joemako. The angle issue in not a huge deal however since as per the theory of what this project is for, the blue triangle vars should never be positive.
I appreciate everything here guys and will look at the shapesheets to better understand how this was all done.

I right clicked and selected "Format" -> "Special" from the menu, and changed the name to Green, Blue, and Gray
Hmm, I am not seeing how you did that, yet...
« Last Edit: December 19, 2008, 09:44:13 PM by jamtart »

joemako

  • Jr. Member
  • **
  • Posts: 40
    • Joe Mako
Re: Making a triangle respond to... Shapesheet question here...
« Reply #22 on: December 19, 2008, 09:44:30 PM »
jamtart, glad we could help :)

BTW, those were some neat shapes, what collection did they come from?


joemako

  • Jr. Member
  • **
  • Posts: 40
    • Joe Mako
Re: Making a triangle respond to... Shapesheet question here...
« Reply #23 on: December 19, 2008, 09:47:10 PM »
sorry, my sentence broke up with my comment on it being a 1-D shape.

right-click a triangle, a menu pops up, select "Format" then "Special", a dialog will popup with a name field that you can change.

BTW, I am working with Visio 2003, 2007 may be different.

joemako

  • Jr. Member
  • **
  • Posts: 40
    • Joe Mako
Re: Making a triangle respond to... Shapesheet question here...
« Reply #24 on: December 19, 2008, 09:50:27 PM »
Quote from Visio Guy:

Quote
Don't worry, your problem is easily solved! And something did change with Visio 2007!

To access the dialog where you can see and edit a shape's name, you use the Special dialog, located under the Format > Special menus.

In Visio 2007, this menu has been hidden unless you are running in Developer Mode. This sounds ominous, but it's just a matter of a simple check box:

Go to Tools > Options. On the Advanced tab, notice the check box up at the top named Run in Developer Mode. Simply check this item and the Special dialog will be accessible!

jamtart

  • Jr. Member
  • **
  • Posts: 67
Re: Making a triangle respond to... Shapesheet question here...
« Reply #25 on: December 19, 2008, 09:55:36 PM »
Ahh, progress...
Thanks for that. I will be sure to use everything I have learned here

vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Making a triangle respond to... Shapesheet question here...
« Reply #26 on: December 20, 2008, 06:28:11 PM »
Guys...it has been suggested that I somehow attacked this effort and/or some of the authors.

That is and was the farthest thing from my mind.  All I was trying to say is that if this solution is going to be general purpose (used against various types of triangles, various sizes, etc), then some of the math issues need to be addressed.

I am all for people getting creative on solving their specific needs.  And I am the first admit that some solutions are less than optimal (some of mine are, frankly, a bit useless to the wider audience) but serve an important purpose.

So apologies of if my intent was misconstrued.

Happy holidays.

jamtart

  • Jr. Member
  • **
  • Posts: 67
Re: Making a triangle respond to... Shapesheet question here...
« Reply #27 on: December 22, 2008, 11:09:31 AM »
hey joemako, as for your question regarding where I got the shapes, to be honest all I did was do a search in Visio for Right Triangles and this is one of the items that came up so I had no idea what stencil it belonged to. I am using 2007. It belongs in Visio Extras/Drawing Tool shapes.
Hope that helps...
« Last Edit: December 22, 2008, 11:14:00 AM by jamtart »

joemako

  • Jr. Member
  • **
  • Posts: 40
    • Joe Mako
Re: Making a triangle respond to... Shapesheet question here...
« Reply #28 on: December 22, 2008, 11:22:29 AM »
Thank you, the triangle is in Visio 2003 as well :)