Retaining Grouped Shapes Actions

Started by RudySchneider, May 07, 2015, 06:28:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RudySchneider

I'm not certain I can describe this correctly, but I'm gonna try anyway...

I started out with a Smartshape whose outside box dimensions auto-size to fit the internal text.
I then added some Action items that would further alter the box geometry based on selections.
I then wanted to add and position one of two text characters to the shape, again based on Action selections.  So...

I made the original Smartshape a group, opened the group, added the text, and altered the shapesheet for each individual element based on the Action items in the group shapesheet.

My problem is that if I set the SelectMode to 2 under Group Properties, I can double-click on this grouped SmartShape to edit its internal text.  But, I have to click (slowly, not double-click) a second time before I can right-click to access the three Action items that can alter the geometry and added text.  AND, when I then move the shape, the additional letter(s) stay where they are.  I need to set SelectMode to 0 in order for the letter(s) to follow, but then I can't edit the text internal to the box!

I would like a way to double-click to alter the internal text, and only single right-click to alter the geometry.

I've attached the Stencil for the Smartshape in question.

Thanks
There are no problems, only opportunities

wapperdude

#1
I'm really confused...

1.  Outside dimensions auto-size:  the attached shape has very limited auto-sizing capability.
2.  Added some action items:  there is only one action item???
3.  No action to do any repositioning

What I found:
1.  The existing Action toggles User.DO between true and false
2.  User.DO doesn't do anything
3.  Geometry section has a lot of broken formulas.  Probably a result of grouping, but...
4.  There is no grouped shape.

Did you send the right shape?  If so, there is so much broken, and without a comprehensive description of what the shape is supposed to do, there is no way to offer any suggestions.

BTW, it's easier if you just save the shape as a VSD drawing rather than as a stencil.  Just more convenient. 

Wapperdude
Visio 2019 Pro

RudySchneider

#2
Actually, it's not "broken" as far as I can tell, but exhibits different results if I save it after setting Select Mode to 0, 1, or 2.

Here it is again.  In this case, you should see three Action Items that will change the geometry and the "G" or "V".  But I'm looking for a way to alter the "DO" text, which will adjust the size of the box, while keeping the "V" or "G" in its proper place.  I can get one or the other, but not both.

Oh, and here's a .vsd, as well
There are no problems, only opportunities

wapperdude

The shape on the drawing is much different than the shape that came with the previous stencil.  I did not check the current stencil.  The shape on the drawing has all of the "actions" that you initially reported, whereas, as I stated, the original stencil shape had only the DI/DO action. 

Your top level group shape is named DI_DO.87.  The subshape which contains the text "DO" is DI_DO.  In order to get text pushed into the subshape, you need to use the insert > field function from the UI.  However, one caveat, the DI_DO.87 sheet name isn't recognized.  So, it turns out, this is sheet.1...on the drawing page.  So, here's what to do:

1.  Select the subshape DI_DO.
2.  Go to menu bar and Insert>Field
3.  In custom menu, enter =IF(Sheet.1!User.DO,"DO","DI")

Close the Field menu.  Unselect the subshape.  Select the top level shape and the DI / DO action will change the text.  Tested and verified.

Wapperdude
Visio 2019 Pro

RudySchneider

We posted at pretty much the same time, Wapperdude, but I fear you're still missing something important.

"DI_DO" is a generic name for the shape, but not necessarily the desired text within the shape.  As I said in my original post, I want to be able to alter the text content of the DI_DO shape by double-clicking on it, which will re-size the overall shape, while still having the selectable actions of specifying whether "G" or "V" appears in the triangular portion of the geometry.
There are no problems, only opportunities

wapperdude

OK.  Yeah we're not on the same page, I misunderstood your desire.  I thought you wanted either "DO" or "DI" to show up, which is what the formula does.  But, you want to replace the "DO" with arbitrary text.  However, when you put in arbitrary text, you "lose" the "G" or "V", correct?

Actually, you don't lose either of those letters.  As the text and the shape expands, the text writes on top of the letters, because they don't move with the expansion.  You need to change the formula for PinX of the "G" / "V" text shape.  Presently, it references the left side of the figure, i.e., width =0.  You need to reference to the right side, the side that moves.  Your shape expands OK, but, the text position doesn't track the expansion.  Looks like that's the only correction you need to make.

Wapperdude
Visio 2019 Pro

RudySchneider

Wapperdude...
You need to take a closer look at the PinX and PinY formula for the "G" and "V" characters.  The formula references
User.RightSide (if it's not right, it must be left), and
User.DO (whether it's a Digital Output or Digital Input; again, if it's not DO, it must be input.

I'm getting closer myself, just a bit more work (at work only, I'm afraid, since my home trial version of Visio 2010 is no longer valid).
There are no problems, only opportunities

wapperdude

Rudy...

I understand that PinX flips reference depending if shape is left or right facing.  In either case, it references the "stationary" edge and has a fixed offset.  You must see that as you input text, the "G" or "V" are not moving as the shape expands.  So, as the text is entered, it expands over those letters making it look like they disappear.  But, they really are still there.  Tell me that you can see that.  So, what I'm saying is that in addition to flipping with left / right orientation, PinX must track with the expanding edge.  Your PinX formula must change to include the shape growth.

Wapperdude

Visio 2019 Pro

RudySchneider

OK, in the words of Cool Hand Luke, "What we have here is a failure to communicate."

Or maybe not.  I'm home now, so I can't truly confirm or deny anything, but...

If you open the grouped shape and then open the Shapesheet for the "G" or "V" character, you will see that its PinX position depends on the dimension of its parent shape (the auto-sizing-with-text  box), whether it's an inny or an outy (DI or DO), and whether it's on the left or right side.

The version you have, however, may be referring to a Sheet number rather than the DI_DO shape itself.  When I made that correction, the "G" and "V" DO indeed move, though not correctly.

None of this still addresses my initial concern, however.  But fear not, I WILL prevail!
There are no problems, only opportunities

wapperdude

The shape I worked with does
1. Innie/outie thing
2. G/ V thing
3.  Left right thing
4. Dbl click add text thing

What it didn't do
1.  Move G/ V as shape grew with added text
2.  Didn't quite expand correctly

It seems like you've solved most of the problems already, just need to get the resizing done.

Wapperdude
Visio 2019 Pro

RudySchneider

To bring closure to this thread, and to perhaps help someone else, I went through a couple of iterations on the Smartshape that worked, but I think this version is the simplest and most straightforward.  Having said that, there are Visio gurus who can probably come up with even simpler implementations.  I just wanted to bring closure to the thread I started...
There are no problems, only opportunities