News:

Happy New Year!

Main Menu

Changing Shape with Right Click Option

Started by ThirdDimension, November 03, 2015, 02:19:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThirdDimension

I am learning to work with the shape sheet and excited about all the possibilities!  I have a simple wire termination that has three different options for the shield GND (pin straight in, daisy chain, or NO GND).  (see attahced)

I would like to add a right click option to swap between the three options.  Can you please point me in the right direction?

Thanks!!!

3rd D


Yacine

Yacine

ThirdDimension


ThirdDimension

I am getting a formula error when I perform this step.

I am trying to set this is up on a shape contained inside a stencil, so I am editing the shape inside the stencil (if this makes a difference)

any suggestions?


wapperdude

You need something like. =IF(Sheet.1!User.Option<>2,1,0)  where 1=TRUE and 0=FALSE
Visio 2019 Pro

Yacine

You need to reference the parent shape. In the example shown it was "sheet.1".
If you want to see which shape is the parent, just look one section above. There you see to what the child shape references it's geometry (PinX and Y, Width and Height)
Yacine

wapperdude

Visio 2019 Pro

Yacine

@Wapperdude, the IF statement is not necessary. The screenshot is from a functioning shape.
Yacine

wapperdude

#8
@Yacine:  ...IF...    Just learned something new!   ::)  Never occurred to me to try that without the IF statement wrapper.  Seems like "poor" form to be able to do that, but does save a lot of typing! 

So, then, a couple of things led to "false" conclusion.  Since I have V2007, can't open the VDX files, but, the PNG file showed reference to "Sheet.1"...presumably, but, not necessarily, the parent.  I wasn't discounting your previous comment about the "parent", just thought it was an established fact already.  That, plus the missing "IF" statement lead to an obvious, but erroneous conclusion. 

The price for being lazy is egg on the face!  Apologies to all!   :-[    :P   

Summarizing, the original formula should work as long as the User.Option reference is in the sheet.1 shape.

wapperdude

Visio 2019 Pro

Yacine

#9
Sorry Wayne, I was too lazy to chose another file format.
I enclose the file - not that it is so valuable - but to let you participate ;)

The differnce between the IF and and the "IF-less" statement, is that the second can only give a boolean value. With IF you can write anything you like as result.

Cheers
Yacine

wapperdude

Original post was vdx I think...so, natural to respond with vdx.

:)  Funny, looks like we both suffered from the "lazy's"...time for a nap???   LOL
Visio 2019 Pro

wapperdude

#11
I looked at the VSD file, seems like the "process" could be simplified.  Keeping in mind, that the NoShow cell implies negative logic, i.e., "TRUE" means hide, "FALSE" means show, and, assume that Sheet.1 is the actual shape which contains the formulas, in this case, the group parent shape, then, for the desired action, why not just enter something like  =NOT(Sheet.1!Actions.Row_1.Checked), thus, eliminating the User.Option cell?  Trivial point, but seems a bit less "vague".

Just a thought.  Trying to remove some "egg".

Wapperdude
Visio 2019 Pro

ThirdDimension

Thanks for all the help.  I am not sure how to determine what the parent file name is. When I select the shape (grouped), I do not see anything that says "sheet" on the shapesheet.  I see the following (attached), and I am not able to compete any equations without errors.

Any suggestions?

Paul Herber

Use the Drawing Explorer window (or Master Explorer if working with master shapes).
This is selectable from the Developer tab.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

ThirdDimension

Thank you Paul, Wapperdude, and Yacine,

For some reason, I could only get the "=NOT(Sheet.5!Actions.Row_1.Checked)" command to work. 

I also found Paul's advise very helpful with using the Mater Explorer menu, along with pulling the shape into a new drawing window.  That allowed me to visualize a little better.


Thanks!!!

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: 392 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1235KB.
Tokens: post-login.
Cache hits: 13: 0.00170s for 26,561 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]