Visio Guy

Visio Discussions => General Visio => Topic started by: Malcolm Debono on February 11, 2016, 11:21:02 AM

Title: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 11, 2016, 11:21:02 AM
Can someone please tell me if there is a way to set the display options on a page for say doors and windows and having used the doors and windows lock them. Then set different display options for doors and windows and use those on the same page. Any help would be appreciated.
Title: Re: Lock Display Options And Reset On Same Page
Post by: JohnGoldsmith on February 11, 2016, 02:23:59 PM
Hi,

What version of Visio and template are you using?

By locking, do you mean you set some options and then lock those options in that state?  Assuming you're using one of the Plan templates, then the settings that are available in the display options dialog are mapped to User cells in the page.  Out of the box I don't believe you can't do what you're after, but you could certainly accompish this with code.  Also, depending on how far you want to go you could edit the masters and add some kind of IsLocked state and only allow the Display Options dialog if it was false.

Is code an option for you?

Best regards

John
Title: Re: Lock Display Options And Reset On Same Page
Post by: JohnGoldsmith on February 11, 2016, 03:39:21 PM
I was just chatting with David Parker, who came up with the good idea of syncing the page cells to a central doc location - the document ShapeSheet.  If you mirror the cells from the page that you're interested in (see attached image), in the doc ShapeSheet, then you can continue to use the Display Options dialog and then the settings will be applied across the document.

You can also use the SETATREF function to take in a page level IsLocked cell to take part in that synchronisation or not.

If this sounds of interest, then you might find this useful where I did something similar a while ago: http://visualsignals.typepad.co.uk/vislog/2011/11/shapes-with-global-values.html

Best regards

John

Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 11, 2016, 03:58:47 PM
Hello John Thank you for replying. I am using 2013 and the plan template. You are far more advanced in the technical side than I am. Can you please tell me. Is it possible to somehow, which you mentioned, save an existing master under another name and set different options or does the program always revert to the set options. If not could you explain a little more on how to lock it,  IsLocked state ?
Title: Re: Lock Display Options And Reset On Same Page
Post by: JohnGoldsmith on February 11, 2016, 04:07:47 PM
Hi,

You might be able to although I haven't tested what's involved with this template (and importantly its supporting addon).

It looks like it doesn't care about the template too much as the addon is initialized from the EventDrop cell within the shapes.

How familiar are you with the ShapeSheet?

Best regards

John
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 11, 2016, 04:18:12 PM
John I am afraid I don't use the shapesheet. If it were a simple change I could probably work through it with a bit of direction to get me started.
Title: Re: Lock Display Options And Reset On Same Page
Post by: JohnGoldsmith on February 11, 2016, 10:21:11 PM
Hi,

Oh ok.  Well I would say that it's not a simple change unfortunately, so unless someone here puts their hand up then I think you'll be stuck with the out of the box functionality.  I'm afraid I don't have capacity at the moment.

Why not reiterate exactly what you're after and see if anyone is willing to help out?  People here are normal more than generous with their time.

Best regards

John
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 12, 2016, 08:35:45 AM
Hi John Thank you for replying. To reiterate is it possible to save a master under a different name and set different display options using both masters on the same page. Any help would be appreciated.
Title: Re: Lock Display Options And Reset On Same Page
Post by: wapperdude on February 12, 2016, 04:24:26 PM
Which display options are you trying to lock?   Is the idea to then have two,  e.g., door masters, and then drag and drop a particular master according to properties?

Wapperdude
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 12, 2016, 04:39:43 PM
Hi Thank you for replying.
>Is the idea to then have two,  e.g., door masters, and then drag and drop a particular master according to properties?
Yes.
What I am trying to do is use one of the standard masters say for a door, set the options for the sills and save it and again use the same standard master for a door, set the options (but different) for the sills and save it under a different name. I used the word lock because no matter what I have tried it always reverts to one option and I do not have enough understanding to lock them to stop them changing.
Title: Re: Lock Display Options And Reset On Same Page
Post by: wapperdude on February 12, 2016, 06:22:53 PM
The problem is that these features are stored in the page shapesheet.  So,  when you drop your shape it inherits the current page settings.

You need to modify your"custom" door to ignore the updating.
1)  make your changes.   Make a note of which options you changed.
2)  open shapesheet for the shape.   Right click somewhere in the window and select show values
3)  in the User Defined sectio, find the row that has name referring to your changed option.
4)  in the value cell,  enter the value you see.   This will clobber the underlying formula,  "freezing" the value that you entered.
5) save your custom shape to a stencil.

Now your settings are preserved.   Non-modified entries behave normally.

Wapperdude
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 12, 2016, 06:44:47 PM
Thank you Wapperdude I will try what you said (hope I can get my head round it).
Title: Re: Lock Display Options And Reset On Same Page
Post by: Yacine on February 12, 2016, 07:07:35 PM
To me it looks like a scenarios problem. ie: setting up different configurations and saving them for later use.

Kiler has built such a tool some times ago.
Look here: http://visguy.com/vgforum/index.php?topic=6051.msg24542#msg24542 (http://visguy.com/vgforum/index.php?topic=6051.msg24542#msg24542)
He stored the shape data of each scenario in a column of an external excel file, then he used some formula to update the actual worksheet linked to the visio file, so that finally he only had to refresh the data to get another scenario in Visio.
For mdd this would mean, that he needs to link the visual properties of his shapes to shape data.

Cheers,
Y.
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 12, 2016, 07:27:38 PM
Wapperdude I tried what you said and the main thing I wanted to achieve works. One part doesn't work and that is when I change the depth of the outside sill then do what you said on the ShapeSheet it still reverts to one size. Maybe I am not doing something, hopefully I will work through it. Thank you so much "when you know how to do something it is easy but when you don't it is so hard".
Title: Re: Lock Display Options And Reset On Same Page
Post by: wapperdude on February 15, 2016, 05:08:58 AM
Well, some of these shapes are quite complex,  made of multiple subshapes.  Passing of data becomes rather involved.  It's not uncommon to pass the group data directly to a subshapes.  The sill depth is one of those cases. So,  further shapesheet explanation necessary.

When you open the shapesheet, near the top of screen is a horizontal GUI bar (forgot what it's called).  The left most icon is Shapesheet Formula Teaching Window.  Click it.  A new sub window will display in the right edge of shapesheet window.   Next to the icon you selected is the Trace Dependents icon.   Select it if it's not.   This allows you to see what cells depend upon the value of a cell in the shapesheet that you select.  You can use help or Google for more info on formula tracing.

Now,  go to the Shape Data section.  Find the row for WndwSillDepthIn and select the value.  The Formula Trace widow will show who's depending on this value.   In this case,  it'll be something like Sheet.46!Height.  That is the cell you need to edit.  It is a subshape, Sheet.46.

Now, you need to open the Drawing Explorer Window.   Find it under View.  In the DW,you navigate by expanding the tree. ..Page > Shapes>Window>Shapes>Sheet.46. or something like that.  Right click Sheet.46 and show shapesheet.
In the "Height" cell, enter the desired value.

That's it.   Close shapesheet windows.  Save your shape.

Wapperdude
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 16, 2016, 02:03:59 PM
Hi Wapperdude Thank you for spending the time, appreciated. I cannot find the sheet.? I found the trace window which refers to sheet.707 for the sill depth and I have drawing explorer but I cannot find where it refers to Page>Shapes>Window>Shapes>Sheet.708. I opened each tree in drawing explorer. I must be doing something wrong, image attached.
Title: Re: Lock Display Options And Reset On Same Page
Post by: wapperdude on February 16, 2016, 03:12:04 PM
You're close.  My explanation was too simple.

Sounds like sheet.707 is what you want.   The ID number changes,  it's like an increment counter that advances for every new shape added to drawing. 

There should be help available for DEW ( drawing explorer window). 

Expand the foreground pages.  That will show all of the Drawing pages in your file.   Expand the page your shape is on. Keep expanding in manner previously indicated until you come to your target shape,  "707".
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 16, 2016, 04:03:03 PM
I just don't get it. I have searched and searched the image attached shows I selected a window on the visio page. Formula trace says it is sheet440!Width. Drawing explorer shows Window- Sheet419 to Sheet427 then Window.448 Sheet449- 450,451. If I open one of the sheets it show Layers.
Title: Re: Lock Display Options And Reset On Same Page
Post by: wapperdude on February 16, 2016, 04:36:47 PM
From pix that you've captured,  the shape you've selected is identified as "No 3", not "Window".  The Size &Position Window shows name of selected shape, as will the banner of the shapesheet (which isn't shown here).  So you're not going down the correct shape tree
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 16, 2016, 05:11:01 PM
Okay Wapperdude I think I got it. Thank You. Can you please tell me what I have done. Am I right in saying that if I go the route you just showed me.
I can change a window shape on a page and it will keep the changes.
I can change another window shape on a page and it will keep the changes.

Can you please tell me.
If I save those 2 windows as masters will they retain the display options?

I must say you are most helpful.
Title: Re: Lock Display Options And Reset On Same Page
Post by: wapperdude on February 16, 2016, 05:43:43 PM
Yes, that is correct on all accounts.
Title: Re: Lock Display Options And Reset On Same Page
Post by: Malcolm Debono on February 16, 2016, 05:59:23 PM
Thank You