News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

How would you approach this?

Started by Vendril, December 25, 2014, 03:33:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vendril

Hi all,

I'm pretty new to Visio (besides simple flowcharts) and I am looking build on my understanding. I have played and Google and sunk time dealing with some concepts but now I would like some feedback on how you would approach my task before I commit to a path. I am sure that many of you will have great questions that I haven't thought of yet which could influence my needs and understanding of the power of Visio.

I want to show an office layout for a building with multiple floors which shows all the desks on each floor. I would like to hide shapes linked to each desk that are not relevant. i.e If the Desk does not have a phone number in the prop.number then don't show the phone shape on the desk. So far I have 5 items I want to show on each desk - Phone, 2 Monitors, Laptop, PC Tower. I would like this so at a glance I can see which desks are vacant, have a phone but no user, etc.  Also would like to be able to build on this over time as my understanding grows.

I will be to using Visio Services on SharePoint and relevant people can manage their own assets.  i.e IT can just update asset numbers for items (based on the Desk ID), HR can manage phones and people the same way. I'm thinking a separate list for each section?. So different users ideally would only see what is relevant to them on the master drawing (new page with layers off for each view?). All staff in the ORG should be able to see at least a basic floor map with the Desk ID, Name, and possibly phone number.


My thoughts and experiments so far:

Path 1:
Make a master shape that has a desk and each of the items I want on it. The Desk shape data-set will have a full list of all the information associated with that desk.# from the linked data.  In the Shape-sheet for each item and shape go and make the geometry .noShow=True if the value is blank.

Problems - Editing by hand all the shape-sheets is painful and I'm still wrapping my head around stencils, masters, grouped shapes and putting my data-set on the right shape! Changing the rotation on desk doesn't allow the items on it to stay at 0 deg (I always want the phone to be on the same position/edge of the desk but not rotate around so that when I set up data graphics the text is formatted correctly). So unless I can stop the rotation I will have to make multiple Masters which doesn't seem efficient.

Path 2:
Customise each shape to hold it's own data.  Have the desks on a background page, which is itself on the Building background page. Items are manually positioned and ID's are all set to the same as the desk so the data matches.
Problems - Still have to edit the shape-sheet for each item and how to .NoShow from a value property of itself is proving to be an issue. Unsure of how the end user will interact. 

Well thanks for the time to read my post. I appreciate any advice and ideas and questions.  My home environment is Visio Pro 2013 but the end usage will be in SharePoint 2010.


Thanks,

Yacine

Hi Vendril,
just some thoughts:

       
  • To make sure people edit only the data they are allowed to, you need a separate input tool - eg a database with an input form. The drawing will need to be linked to the drawing to update it.
  • You would prepare the desks and the sub-shapes as masters and make sure to mark them for easy identification (eg user.type, user.version). user.type would get values like "desk", "phone", etc. The version field will allow for later replacement by newer shapes if needed.
  • When drawing, you would only place the desks at the right place.
  • The custom properties would be set by a vba  routine - either on drop or later at once for the whole drawing. The selection of shapes to modify being limited to the shapes with the right user.type field ("desk")
  • Data input can subsequently be done in the drawing or in a database.
  • A further routine would then place the sub-shapes in the desk-shapes depending on the custom props.
  • The visibility of the shapes could be controlled either by means of layers or by formulas referring to global values in the shapesheet of the page.
Quote how to .NoShow from a value property of itself is proving to be an issue
Sheet.1 being the desk, sheet.2 being the phone
sheet.1 could have a prop.phone (boolean)
in sheet.2, in the geometry section field NoShow = not(sheet.1!prop.phone) - This is only one many ways to toggle the visibility.
For a global switch you could add to the page a prop.showPhone, then enhance the formula of sheet.2 :
NoShow = NOT(AND(thepage!prop.showPhone, not(sheet.1!prop.phone)))

Regards,
Yacine

Yacine

vojo

Another way to go is the following

1. make a super shape (shape group) that has everything
      - Desk, phone, etc
2. at group level, create custom props for each subshape
      - Custom props for desk....say, size, drawers, etc
      - Custom props for phone...say, number, present, etc
3. at group level, add some actions (right click then click what you want)
      - Entries for phone, etc
      - in each action, you can launch the props menu
      - Use that action checked cell to show/hide props....for example, click phone and checked wil hide all others and show number etc

Wont kid you ...this gets complicated

see below....right click and start it off  (this uses the first custom props panel to determine what details you want to see)

Yacine

#3
@Vojo,
yes a complex shape is needed at the end, but first you need to make sure not to end in a "cul-de-sac".
Therefor routines to build up dynamically the shapes are very useful.
@Vendril,
I had some time to play, so please have a look at the attachment.
What you need to do next is set a database up with the relevant fields and data and link it to the drawing.
Make sure to have the same fields in the drawing and the DB.
Regards,
Yacine


PS: the vsd is only for demonstration. The code is in the stencil.
Yacine

Vendril

WOW!  Thanks! I have just finished making the building floor plans to clear my head space and have come back to this.  I have just had a quick 5 min play around and this looks great.  I'll spend a few days poking through the VBA and some more looking at the shapesheets - and then more google and videos - then I can and come back with any questions if that's OK?

A few questions when you have time though.  Can you elaborate on the User.version Property you have set and how this would be used in the future?  This testing/learning i'm doing now is for the current building and we all use L desks, but sometime next year the new building we will just have nice rectangles so the desk shape will change so I am guessing it will help with that changeover?  Also did you make these shapes from scratch or were they masters that you have modified and then saved as masters into the stencil?

Overall very cool that you could whip this up so fast.




Yacine

Quoteon the User.version Property you have set and how this would be used in the future? This testing/learning i'm doing now is for the current building and we all use L desks, but sometime next year the new building we will just have nice rectangles so the desk shape will change so I am guessing it will help with that changeover?
Yes, the version field will help later replacing old shapes by newer ones.


QuoteAlso did you make these shapes from scratch or were they masters that you have modified and then saved as masters into the stencil?
The shapes are from scratch, that's why they are so ugly.  ;)







Yacine

Vendril

#6
Happy new Year!

So I have had a play and made some changes. Any changes in the code I just commented out the original line and placed mine directly below. I also added a heap of comments into the code so I could follow along what was happening to the best of my understanding and so future generations will be able to follow along:

Changes made:

  • changed the desk custom props to better reflect the data set coming in from the excel workbook (will be different SharePoint2010 lists later).
  • changed the sub shapes to some I found online.
  • included new sub shapes for desktop and laptop, updated VBA to drop new shapes
  • resized the shapes to fit my scale
  • added a new L desk labeled desk2 in the stencil.
  • added the stencil to my actual visio workbook I will use to scale and placed some desks on there

Some things I noticed that I broke.

  • Hardly important but the live update of shapes. On the original I could manually edit the shape data and it would change as soon as I exited the field.  This wont matter in the long run as it will all be data link driven. Just wanted to note it.
  • With the single DG I have set so far (colour by label "group") I have to run the macro twice.  After the refresh it changes the desk to a colour including sub shapes, but if I run the macro again it removes and places the sub shapes fresh on the desk.
  • I noticed that the legend doesn't update itself after it's been placed. I'll look into a way to place it fresh after each refresh in the VBA.


Now for the help requests if you can point me in the right direction please ;D

  • I tried editing the code to include my new desk2 shape but it doesn't want to drop the sub shapes on it still.  I was hoping to do a "if its desk(original) then place subshapes at.., if its desk2(L shape) place them at ..." kind of thing.
  • Text rotation is an issue for the desks. I want everything to be 0 degrees to the page.
  • For my views I really need some advice on how best to represent the data without it getting too crowded. I was thinking along the lines of having the initial view just with the desks coloured as I have with the data graphic and a name on it. Then maybe on click have some of the other shape data show up/pop up or something. Not everthing but maybe just select items like name, phone number, assets numbers? I'm not done much on text boxes but is this the idea?
  • On the above I've played some with the DG but as soon as the shape is rotated it all goes to hell which is why i'm thinking text boxes.  You see from the page that I am using the space I am working with which is why iI don't really want to clutter up the page with every desks data at the same time.
  • For my desk2 I tried to edit the workstation cubicle but so many groups it got confusing so I just decided to try making my own. It's serviceable but IDK why the underlying sheet turned out to be a big off center rectangle and not a square like my desk.  Worried about if this will impact things later on for some reason?

My vsdm file is too big so I have uploaded the files to my dropbox.  stencil, dataset workbook and the visio drawing.  Shared folder is https://www.dropbox.com/sh/be24sz8brypcgx7/AADaKkMZ_iuc2YgSb-dVI8bua?dl=0 

Thanks again for all your help. I'm really enjoying this!!

PS: at this stage should I close this thread and open a new one in a different area?

Yacine

#7
Hi Vendril,
Happy new year to you too.

There were some minor errors in the code.

1) The formula in user.action was not written because the writing was inside the "IF cellsexists" statement. Since your master did already include an empty user.action row, nothing happened.
2) The master "desk" did not include the appropriate "CALLTHIS" formula in the drop event. This cell is near the bottom of the shapesheet.
3) I added a global constant "rotation" to allow for locking the angle of the sub-shapes to the page. This may not be the most elegant way, but it shows at least, how you can control the angle.
4) You forgot to add the user.type field in the laptop master. This prevented it from being deleted.

And here some thoughts regarding your questions:

QuoteHardly important but the live update of shapes. On the original I could manually edit the shape data and it would change as soon as I exited the field.  This wont matter in the long run as it will all be data link driven. Just wanted to note it.

corrected in 1)

QuoteWith the single DG I have set so far (colour by label "group") I have to run the macro twice.  After the refresh it changes the desk to a colour including sub shapes, but if I run the macro again it removes and places the sub shapes fresh on the desk.

I don't know your dialog, but there is a difference when formating a shape in the UI or by code.
In the UI the formating is applied to the shape and it's sub-shapes.
When you code, you modify usually only the according cell of the parent shape.
If you want this format to be applied to the child shapes too, you need to iterate through these shapes.

QuoteI noticed that the legend doesn't update itself after it's been placed. I'll look into a way to place it fresh after each refresh in the VBA.

Sorry, but I'm still on Visio 2007, so I couldn't open the vsdm and could not see the legend.

QuoteI tried editing the code to include my new desk2 shape but it doesn't want to drop the sub shapes on it still. 

Addressed in 2)

QuoteI was hoping to do a "if its desk(original) then place subshapes at.., if its desk2(L shape) place them at ..." kind of thing.

It may look tempting to set up the drawing completely by code, but you may also thing about  placing then subshapes at named control points.
This would have the additional advantage to have the sub-shapes easily move-able.

QuoteText rotation is an issue for the desks. I want everything to be 0 degrees to the page.

Similarly to the angle of the sub-shapes, the text can be kept from rotating.
You can use the same formula, only the cell reference must be changed.
shp.CellsSRC(visSectionObject, visRowTextXForm, visXFormAngle).FormulaForceU = "=IF(BITXOR(FlipX,FlipY),Angle,-Angle)"

QuoteFor my views I really need some advice on how best to represent the data without it getting too crowded. I was thinking along the lines of having the initial view just with the desks coloured as I have with the data graphic and a name on it. Then maybe on click have some of the other shape data show up/pop up or something. Not everything but maybe just select items like name, phone number, assets numbers? I'm not done much on text boxes but is this the idea?
On the above I've played some with the DG but as soon as the shape is rotated it all goes to hell which is why i'm thinking text boxes.  You see from the page that I am using the space I am working with which is why iI don't really want to clutter up the page with every desks data at the same time.

The strategy on how to represent the data depends mainly on the purpose of the document and the way you make it available.
Printouts would generally have legends and the link to the shapes would be done by IDs placed on or near the shapes.
Interactive documents can display different types of information depending on user's choice.

For an interactive document, the initial choice would probably be where to put the smartness of the shapes, the shapesheet or the code.
Shapesheet solutions are easier to distribute and easier to handle (?). Hardcoded behaviour may be better for maintenance and scalability issues.

In a shapesheet solution the shapes could refer to global variables of the page.
eg: Hidetext = thepage!prop.hidePhoneText

In a coded solution, you would either modify directly the characters property of the shape or a custom property to display on the shape.

You may also consider whether to put the text in the desk shape, or the sub-shapes.

QuoteFor my desk2 I tried to edit the workstation cubicle but so many groups it got confusing so I just decided to try making my own.
Wise solution  ;) 
QuoteIt's serviceable but IDK why the underlying sheet turned out to be a big off center rectangle and not a square like my desk.  Worried about if this will impact things later on for some reason?
Didn't get this point.

QuoteMy vsdm file is too big so I have uploaded the files to my dropbox.  stencil, dataset workbook and the visio drawing.  Shared folder is https://www.dropbox.com/sh/be24sz8brypcgx7/AADaKkMZ_iuc2YgSb-dVI8bua?dl=0 
I could check the stencil, but not the drawing, because I'm still on V2007. Would be nice if you could save to V2007 in future.

QuoteThanks again for all your help. I'm really enjoying this!!

You're welcome, it's a pleasure for me too.

QuotePS: at this stage should I close this thread and open a new one in a different area?

We're usually not so strict, about forum rules, but it helps other members, when topics are clearly separated.

Please find enclosed the corrected stencil.

Cheers,
Yacine
Yacine

Vendril

#8
Hi,

So I played around some and am now going to sleep on it and do some more research, and some more edits before bugging you again.  :P  In case you wanted to have another peek I saved it as a 2003-2010 .vsd file this time. Please don't feel the need to spend anymore time helping me though.  I just wanted to share what I've edited (aka butchered) what you have so generously done for me so far.

I really went overboard with the comments but I figure that more is better at this stage so I know what was going on in the beginning.  I'll clean it up later so it is more readable for myself and others.  I have some thinking to do in regards to how I want users to access the data, layers, and interaction from your previous post. Actually came across a neat video by Chris earlier in the year at Tech Ed 2014 and may be something for me to strive towards XD.

I really appreciate it. Thanks!

Link to the Vid of Chris at TechEd2014:  https://www.youtube.com/watch?v=_kLz0LLs2ig#t=4076
My dropbox folder:https://www.dropbox.com/sh/be24sz8brypcgx7/AADaKkMZ_iuc2YgSb-dVI8bua?dl=0

Yacine

#9
Cool! I like it.

This topic being so classical, I wonder if any of the other "core" (or not so) members would have an opinion about it - ie: building up a visio solution from scratch for displaying a complex structure in a drawing ... a structure aimed to be manipulated and updated over time, displayed and distributed in different ways.
Yacine

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: 454 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1215KB.
Tokens: post-login.
Cache hits: 17: 0.00306s for 26,728 bytes (show)
Cache misses: 7: (show)
Queries used: 17.

[Show Queries]