Link the props of different shapes

Started by Yacine, October 29, 2023, 06:48:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yacine

I have a drawing of an assembly in different executions. The actors and sensors are the same in each execution, but on different places.
I want to minimize the maintenance work and make sure that the props of the corresponding shapes are the same.


What would be a good strategy?


I could imagine writing some code to link each property from the master shape to the slave shapes and protect the data of the slaves.
Use a markup of some kind to differentiate between the master and the slaves.

On the other hand, when I use the drawing for a specific project I would keep only one specific execution and erase the others. So a slave may lose its master.

Any thoughts?
Yacine

wapperdude

#1
I don't understand what you mean by term "execution".

There are various ways to do the linking.  Have you tried and ruled out anything yet.  The 1st that pops to mind is setatref. 

It might be a combo of using code, to see what became broken and needs fixing or what's missing a formula, plus a shapesheet formula, something like the setatref.

Those are my starter thoughts.

Oh, if this is a single page document with just a couple shapes...do it manually.   ::) ;D ;D ;D ;)
Visio 2019 Pro

Croc

I think that instead of dividing the shapes into master and slaves, it would be more convenient to create a separate data store like DRS.
Any of the shapes must be able, at the direction of the operator, to transfer their data to the storage.
The remaining shapes must receive data from the storage continuously or upon the Update command.

Yacine

You're both right. Actually the 3 of us.

1) I tried inserting the reference to the master, it worked. When deleting the master, the formulas get overwritten by the values - that's fine. however if I copied a slave to a new blank page, I got a quite funny "Guard(Ref())" with the result showing correctly.
2) Wayne's solution - the manual work - is for me the most reasonable. I've got appr. 3 x 20 shapes to keep synchronized. But I added a prop field to hold the ID of the group. So when editing the data in a tabular form, I can sort by that ID field and get the corresponding shapes grouped together.
3) The last solution - having the data outside of Visio - is obviously the professional one. It would however force me to modify my whole system, the code, the existing drawings and templates. Not worth it.

Thanks,
Y.
Yacine

wapperdude

LOL.  The manual part was mostly being facetious.

The "Guard ref()" is the expected, broken formula.  Seems there may be 2 ways to fix.  One is using code to push correct formula into the cell.  Hard work is determining what the correct formula may be.

If there isn't a ton of data, perhaps background pages could be a strategy for holding data?...and correct formulas?
Visio 2019 Pro

Yacine

#5
Quote from: wapperdude on October 30, 2023, 03:05:34 PM
LOL.  The manual part was mostly being facetious.
Not at all. This is a real life problem and sometimes automation isn't worth it.

Quote from: wapperdude on October 30, 2023, 03:05:34 PM
The "Guard ref()" is the expected, broken formula.  Seems there may be 2 ways to fix.  One is using code to push correct formula into the cell.  Hard work is determining what the correct formula may be.
Yes, I wrote the formula directly in the prop cell - guard(sheet.123!prop.A).
Using a setatref would require about 20 formulas.
I could of course put them all together in one cell ... why not?

Quote from: wapperdude on October 30, 2023, 03:05:34 PM
If there isn't a ton of data, perhaps background pages could be a strategy for holding data?...and correct formulas?

Yes, but no.
Background graphics won't work, because it is specially the imagery that is changing, not the data.
Pulling the data from the background page is too close to the solution #3 with the "out-sourced" data.
Yacine

wapperdude

Quotebecause it is specially the imagery that is changing
Images?   :o  Images???   ???  We don't do stinking' images!   >:(  LOL. That sounds like an external repository.

QuoteUsing a setatref would require about 20 formulas.
.
I assume that's ~1 per shape.  But, you could build a generic shape with SETATREF pointing to a dummy cell.  Then, after drop, the dummy variable gets updated...which you must do anyway.

If you're doing multiple drops, do it by code.  You might pass both the number of droppings and the actual cell.  No additional editing.  Being clever, you could incorporate connectivity and then, possibly, some manual rearrangement.  Piece o' cake for Monty the snake.  Eh?
Visio 2019 Pro

wapperdude

QuoteI could of course put them all together in one cell ... why not?

Please post result.  Pretty please. 
Visio 2019 Pro