Looking for Some Simple Shape Development/Adjustments

Started by David_H, March 03, 2014, 07:22:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

David_H

Hello,

We use D-Tools (http://d-tools.com/) and when a shape is dragged into Visio a unique component ID is created for each shape that appears below it.  I have attached an example.  For the vast majority of the shapes the component ID cannot be rotated.  If any text related to the shape can be rotated it's usually the text inside of the shape (see "NOT THIS" example), which I never need to rotate at all.

What would be involved in modifying the existing shapes we have so that the component ID's can be rotated?  We've dabbled in making adjustments to D-Tools shapes in the past but it's been a while, unless it's something we can do at 5 minutes per shape based on instructions in this thread, I'd prefer to pay someone here, if there are any interested parties.

Thanks

wapperdude

Attached is simple shape that keeps the text on the bottom and right reading.

All of the formulas are in the Text Transform section of the shapesheet.  This development assumes that there won't be any shape mirroring in either the horizontal or vertical direction.  Only rotation is allowed.  Otherwise, it becomes a bit more complicated.

The entries that are modified are for TxtAngle, TxtPinX, and TxtPinY.  The pinx, piny formulas use "if" statements to test for the angle of rotation.  It is assumed, that only 0, +/-90, and 180 degree rotations are allowed.  If the angle is anything other than those values, the text is pushed into the center of the shape.

HTH
Wapperdude
Visio 2019 Pro

David_H

Thanks a LOT!  I spoke with Adam from D-Tools after posting this and also got some input from him.  Looks straightforward to modify the shape values, many thanks.

vojo

might want to look at gravity function....its intent is for just this

wapperdude

Here's a link that describes controlling text angles:  http://msdn.microsoft.com/en-us/library/aa200989(v=office.10).aspx#380.  Discussion includes the issue of flipping shape horizontally, vertically, using gravity, etc.

It's for V2002, but it does apply up to V2007.  Not sure about the more recent releases, but, I believe the info is still valid.

Wapperdude
Visio 2019 Pro

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: 212 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1056KB.
Tokens: post-login.
Cache hits: 13: 0.00109s for 26,602 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]