Author Topic: SHAPE PROGRAMMING  (Read 5274 times)

0 Members and 1 Guest are viewing this topic.

DAVEDEWEY

• Jr. Member
• Posts: 24
SHAPE PROGRAMMING
« on: September 28, 2017, 01:56:43 PM »
Had a great response to my last post now have shapes that I sort of know how to make intelligent,, is there a good guide or quick view list of commands variables that can be added to smart shapes anywhere

Surrogate

• Hero Member
• Posts: 1834
Re: SHAPE PROGRAMMING
« Reply #1 on: September 28, 2017, 02:16:37 PM »
You need learn ShapeSheet basics!
For example Understanding the ShapeSheet

wapperdude

• Global Moderator
• Hero Member
• Posts: 4877
• Ideas Visio-lized into solutions
Re: SHAPE PROGRAMMING
« Reply #2 on: September 28, 2017, 03:08:23 PM »

Wapperdude
Visio 2019 Pro

DAVEDEWEY

• Jr. Member
• Posts: 24
Re: SHAPE PROGRAMMING
« Reply #3 on: October 01, 2017, 07:46:12 AM »
hey guys thanks for that sort of getting there I think

so I have 4 menu items saying
open
closed
earth in
earth out

open and close works lovely changing colours as i need, there is then part of the shape that stays white untill i select earth in

=IF(Sheet.5!Scratch.A1=1,THEMEGUARD(RGB(0,0,0)),THEMEGUARD(RGB(0,0,0)))
=IF(Sheet.5!Scratch.A1=0,THEMEGUARD(RGB(0,0,0)),THEMEGUARD(RGB(0,0,0)))

=IF(Sheet.5!Scratch.A2=0,THEMEGUARD(RGB(0,255,0)),THEMEGUARD(RGB(0,0,0)))

as you can see im using scratch, i think the real problem is that im using lots of ifs any ideas please

wapperdude

• Global Moderator
• Hero Member
• Posts: 4877
• Ideas Visio-lized into solutions
Re: SHAPE PROGRAMMING
« Reply #4 on: October 01, 2017, 06:02:50 PM »
There's a lot of information missing.  Difficult to help.  Easiest would be to upload your shape.

But...
Under what conditions does the shape stay white?  How are those conditions defined?  The sheet.5!scratch cells???  Under what conditions does the shape change to some other color?

Where are the IF statements located...what cell?

The 1st two IF statements do the same thing regardless if the test condition is true or false.  Thus, they are not necessary as is, and you might as well hardcode the RGB value.  Only the 3rd IF statement does something meaningful.

Wapperdude
Visio 2019 Pro

DAVEDEWEY

• Jr. Member
• Posts: 24
Re: SHAPE PROGRAMMING
« Reply #5 on: October 03, 2017, 02:13:40 AM »
The shape in the attached "HV BREAKER" has menu options closed to supply, open, closed to earth, open

Closed to supply the shape remains red the earth is not shown
Open shape turns black earth not shown
Closed to earth shape remains black but earth symbol shows going from white to green
open was to remove earth but in fairness this could go white if either of the first two were then pressed

Yacine

• Hero Member
• Posts: 3234
Re: SHAPE PROGRAMMING
« Reply #6 on: October 03, 2017, 06:30:25 AM »
Can you show each combination individually?
Yacine

DAVEDEWEY

• Jr. Member
• Posts: 24
Re: SHAPE PROGRAMMING
« Reply #7 on: October 03, 2017, 07:03:24 AM »
For sets copied here in real terms there is no needs for open from earth as this could be a toggle of closed to earth or open from supply

Yacine

• Hero Member
• Posts: 3234
Re: SHAPE PROGRAMMING
« Reply #8 on: October 03, 2017, 09:20:51 AM »
Nut sure whether I got every thing right ... check the attachment.

The things I modified:
- scratch section
this is fine, but not really needed. This section has several columns, one can use for properties (A and B), coordinates, etc.
In your case, you're just looking for a boolean checked/not checked, so I replaced the scratch cells by user cells. A pure "esthetical" issue.

- the sub shapes were far too complex, I replaced them by 2 shapes.
Yacine

DAVEDEWEY

• Jr. Member
• Posts: 24
Re: SHAPE PROGRAMMING
« Reply #9 on: October 03, 2017, 11:21:41 AM »
thats very good thank could i ask what section do i find you formulas in

wapperdude

• Global Moderator
• Hero Member
• Posts: 4877
• Ideas Visio-lized into solutions
Re: SHAPE PROGRAMMING
« Reply #10 on: October 03, 2017, 01:52:18 PM »
For Yacine's shape, there are formulas in the Actions section at the toplevel, group shape.
There is a formula in the LineColor of the Supply subshape, and a formula in the LineColor for the Earth subshape.  These are controlled by the User.Supply and User.Earth entries in the toplevel group shape.

In the attached, a variation is provided to show further possible consolidations.  As shown, the Supply and the Earth shapes, have reduced geometry sections.

In addition, the overall structure can be reduced from the current group plus 2 subshapes to a group and one subshape.  The trick is to convert the Supply shape to a group.  All of the Actions are still part of the group as before.  Except for the fact that the Earth has a unique color, the entire structure could have been done in a single shape using appropriate geometry sections to control on/off visibility.  But everything would have identical colors...when black, all lines are black, when red, all lines are red.

Finally, for hiding the Earth subshape, rather than changing it's line color, I use the Geometry1.noshow cell.

Mostly, the idea was to show that a lot is possible via the shapesheet.

Wapperdude
« Last Edit: October 03, 2017, 02:17:34 PM by wapperdude »
Visio 2019 Pro

DAVEDEWEY

• Jr. Member
• Posts: 24
Re: SHAPE PROGRAMMING
« Reply #11 on: October 05, 2017, 06:50:11 AM »
These are really good guys, so what would the easiest way be to prevent the earth showing if the shap is closed to supply

wapperdude

• Global Moderator
• Hero Member
• Posts: 4877
• Ideas Visio-lized into solutions
Re: SHAPE PROGRAMMING
« Reply #12 on: October 05, 2017, 08:42:46 AM »
Just to be clear, whenever the closed supply is shown, you never want the earth symbol to show?  Then, assuming there are 2 scenarios that hide the earth symbol...

In the shape I provided, you can use an OR statement inside the IF in the Geometry1.noshow cell.  Since "true" or "1" hides the geometry, something like =IF(OR(A,B),1,0), where A is the closed supply condition and B is the no earth condition.

The same IF statement approach would be true for Yacine's development.

Wapperdude
Visio 2019 Pro

DAVEDEWEY

• Jr. Member
• Posts: 24
Re: SHAPE PROGRAMMING
« Reply #13 on: October 06, 2017, 04:45:21 AM »
i will have a go cheers guys