News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Making a triangle respond to... Shapesheet question here...

Started by jamtart, December 17, 2008, 06:40:48 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

wapperdude

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

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

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

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

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

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.

jamtart

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...

joemako

jamtart, glad we could help :)

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


joemako

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

Quote from Visio Guy:

QuoteDon'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

Ahh, progress...
Thanks for that. I will be sure to use everything I have learned here

vojo

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

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...

joemako


Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 379 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1224KB.
Tokens: post-login.
Cache hits: 13: 0.00137s for 26,739 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]