I am working with a stencil that contains almost 400 shapes and it is far from friendly. Normally a new stencil will show the icon for the shape and its’ name. With this project, the name is far from helpful. Undecypherable is more appropriate. If you right click the band at the top of the stencil window, you are given a choice for View of Icons and Names, Names Under ICons, Icons Only, Names Only and Icons and Details. The last looks tempting, but there is no such cell as Details. What it is, is … Icons & Names over a prompt.
Luckily there is something in the master called prompt. Now, of course, populating that field for almost 400 masters is not trivial, or is it? Back in the days of Visio 3.0, Visio was the first non Microsoft company to fully implement VBA, including the macro recorder. So, it should just be a matter of a few lines of VBA code. It does help if the shape does contain some text that can be used. In this case, I have a Shape Data field called Description that contains the necessary text.
Public Sub EditMaster()
Dim vsoMaster As Visio.Master
Dim vsoCell As Visio.Cell
Dim vsoShapes As Visio.Shapes
Dim vsoShape As Visio.Shape
For Each vsoMaster In ActiveDocument.Masters
If vsoMaster.Shapes(1).CellExists(“Prop.Description”, 0) Then
Set vsoCell = vsoMaster.Shapes(1).Cells(“Prop.Description”)
Replace(Replace(vsoCell.ResultStr(Visio.visNone), “””, “IN”), “&”, “&”)
A few things to note;
– The original text for the field came from XML, so there is a little playing to handle the abbreviation for inches and the ampersand. Luckily I did not have to deal with feet. 😉
– Only masters that have a shape data of Description are changed, all others are left alone.
– for those familiar to using VBA with masters, you do NOT need to wrap the code with an Open / Close that is required when modifying other fields in a master.
John Marshall… Visio MVP Visio.MVPs.org
The Visio Shapesheet has been a core part of Visio almost from the beginning. Though, over the years, it has undergone some revisions to handle new cells, it is basically unchanged. Now, it is long overdue for a major overhaul.
(and give shape developers some love)
To line up with the Office 365, Visio will need an online version. So that would mean writing two changes, a desktop and a online version.
So, I would suggest ripping the shapesheet out of the desktop version and make it a standalone app. When working on the shapesheet the focus is inwards toward the shape, so a standalone application would be sufficient. As a standalone app, it would not have to be redone for the online version of Visio.
Since the new file format uses XML, it should be relatively easy for the standalone app to extract a shape from a file to work on.
I can see several ways the shapesheeet can be enhanced.
The AutoCAD converter creates terrible shapes, I have had a few that have ended up being more than a thousand Geometry shapes with hundreds of rows and totally unworkable. It is not the conversion’s fault, it is basically gIgO. AutoCAD users have different criteria than Visio users. What is needed is a good set of tools.
- Sorting? Not necessarily sorting, but the developer should be able to change the order of the rows in the shape data, user data and connection sections. Rather than using a menu item, an up/down toggle button would be preferred. Using a menu item, is not a big deal, but do it a hundred times and it becomes tedious.
- In addition to rows, Geometry sections should also be able to be reordered, so that one section ends at the point the next section starts. Which would allow …
- Join two sections. If the order of the Geometry sections can be changed, joining adjacent Geometry sections should be relatively easy. Each Geometry section has a start and end point, so joining would mean there would be a common end and start row in the middle of the new section.
- Of course, not all Geometry sections have a convenient start and end point. So it would be useful to be able to reverse a Geometry Section so the section ends where the adjacent section starts.
- A preview window so you can see what the shapesheet generates. This can be down with the drawing page, but you have to switch windows to change focus. A dedicated preview window would keep up with where the designer is in the shapesheet and keep the preview focused.
- Remove the shapesheet window from within the Visio window, so it can be moved to a separate monitor. Actually being able to tear any window off and place it outside the window on a separate monitor would be useful.
- Highlight the current geometry section in the preview window. Use a gradient so the direction of the geometry section is obvious. Let the designer have an idea of where the geometry section starts and where it ends. As before, keep the content of the preview window centered on the current work.
- Allow the user to set the highlight colours.
- A few versions back, Visio added relative positioning in the Geometry section. Another useful feature would be a toggle button to switch between absolute to relative.Sometimes it is easier to enter absolute positions, other times it is easier to use relative. Currently we can use a menu item, but that involves selecting the Change Item type and remembering the appropriate alternate type.
- Add a command to turn a shape with many geometry sections into individual shapes.
- Add a command to split a Geometry sections in two, based on what row is selected.
- Replace Shot gun editing with fully automatic editing. Shot gun editing should remain, but full auto will speed up repetitive editing. What am I talking about? To delete a row, you have to select the right click menu and then choose delete row. It is like pumping a shot gun before pulling the trigger. Once or twice, not bad, but when you have to delete hundreds of rows it gets tedious. Being able to click a button is faster, being able to hold down the button and continuously delete is even faster. (and very dangerous)
- An alternate to the bounding box is needed. Rather than just a box, the shape involved should change color. The bounding box just shows that something in that area was selected.
- A bonus would be to use gradient colors that show the direction of lines.
- One of the first things that bites first time shape developers is the ungroup command. For some applications Group and Ungroup are complements and you can ungroup and then group to get back to where you were. In most cases this is true, but with Visio, grouping creates a new shape to control the other shapes and ungroup deletes that shape. This group shape, like any other shape can be enhanced, but ungrouping will also remove these enhancements. So, if you add user data, shape data, actions or connection points, these will be lost. Another nicety for shape developers would be the ability to copy these sections from other shapes. So, never ungroup should be the rule? No, during shape development, grouping and ungrouping is a very useful tool. You can align a set of shapes on their centers, group them and then align or distribute this group with other shapes/groups without destroying the group on center the shapes have in the original group.
- If the shapesheet is like a spreadsheet, why can we not copy and paste cells, rows and sections between shapesheets like Excel? What about copying from a shapesheet to Excel and back.
- When you are working on a Geometry section, the row you are working on is highlighted in the drawing to let the designer know where that point is. Also for reference, if the PinX or PinY cells are selected, a cross should be placed over that point so the designer can see where the point is.
- So, where do these new buttons go? When the shapesheet is open, a dialog box with edit buttons should open for the full session. Far faster than using right click events.
- The dialog should have hooks for third party developers.
- Make the points on the pencil tool more visible. Currently they disappear as the scale gets bigger. A small blue dot buried inside a black line is tricky to see, let alone be able to determine if it is a dot or shape.
- There should be a tool to select a connection point and nudge it. The current Connection tool is not the easiest way to correctly place a Connection Point. There is also no way to easily move the Connection Point.
I know that the shapesheet is not just about the shape, but it could be about the page or the doc, but these last two cases can be easily addressed. Of course, these shapesheets shoud receive a similar upgrade.
Outside the Shapsheet
Of course, before even getting into the shapesheet, the ability to sort the shapes in the stencil would be very useful. Yes, this can be done with VBA, but this should be a standard feature.
Add an option to the UnGroup command to preserve the shape that was created by the Group command, but free the sub shapes from their servitude to it. Later on, the shape can be converted to a group and the sub shapes re-added to the group.
While we are at it, the team should be working with the other Office teams to create a standardized shape and how it is handled. Word, Excel, PowerPoint and Publisher have their own shapes, MSOshapes and can easily transfer between each other, but Visio has its’ own way. You can copy one of these diagrams into Visio and all is fine, but it has lost all its’ smarts and is just a collection of objects. Even what was a red text block in Word or Excel goes from a single object to multiple objects, one for the text, one for the red background and another for the border. They also have WordArt. This is not a new suggestion, we have discussed it at previous summits in the early 2000s.
John Marshall… Visio MVP Visio.MVPs.org
Visio does have a tool for adding Connection points, but it does not have a tool for nudging that point if you missed the first time or decided at a later date you anted it elsewhere. Normally, Visio Connection points are simple, middle of the shape, one of the corners or the center of one of the sides. Once you get into creating Visio shapes, the Connection point can be anywhere.
In my current project, I am dealing with shapes that connect to tubing. On the surface, this seems like a simple task. The connection point should be centered on the tube. Unfortunately, to create the shape involves a lot of unioning joining and other operations. I could leave the shape as a collection of basic shapes so the tube connection stands out, but that would mean a complex shape with poor performance.
In the Connection sections, the Connection points are positioned at a percentage of the Width and a percentage of the Height. So, simply playing with the scaling factor is a hit and miss operation. The movement by tenth of an inch may have radically different scaling factors for different shapes. Basically, a lot of playing to get it right.
My solution is to create a new shape that when dropped on the shape that needs adjustment would expand to the height and Width of that shape and display a control handle with a bullseye. You can then use the control handle to position the bullseye to the location of the Connection point. At the same time as you are doing this, the shapesheet for the shape is open in a different Visio session at the Connection section. Next to the bullseye would be the scaling factors for that position. So, it would be a simple matter of copying the values to Connection points in the other spreadsheet.
I have created this Connection tool and will be publishing it next week to the Visio Gallery.
John Marshall… Visio MVP Visio.MVPs.org
I have been a long time Enbridge/Direct Energy customer going back to the Consumer Gas days. I have fended off a number of companies that pretended to represent Enbridge. It looks like my loyalty was misplaced.
It all started with the annual inspection in August of 2014.
The technician tried to indicate that the furnace was leaking CO. Considering he had the flame up high, I would be surprised he did not detect CO.
He used a Gauss meter to indicate the leakage. Normally a Gauss meter is used to detect magnetic fields and as such, indicates that there is electricity flowing in a wire.
He indicated that the exhaust pipes were leaky, but what I saw was condensation and it was only a few drops.
At the end, he indicated that if I did not immediately set up a sales appointment to replaced the furnace he would have to red tag the furnace.
This was a bit surprising considering that Enbridge replaced the gas meter and fully checked that the furnace was working properly just a few weeks earlier. Even though the equipment was old that Enbridge technician indicated that it was still in working order and did not need replacing.
Then the sales guy…
He provided no option for just buying the equipment. He only provided two options that dealt with the length of the support. I rarely buy extended warranties because they are usually to the benefit of the seller. Any appreciation in the price of the house will more than cover the replacement cost. He never suggested I get a second opinion, it was just pure high pressure sales. If the deal was good, then getting a competitive offer should have been recommended. There was a lot of pressure to sign before the end of the week. I also was given no idea what, if any rebates to expect. All options supposedly came with a service plan.
40 gallon tank
When they arrived to install the new equipment, they had a 50 gallon hot water tank rather than a replacement 40 gallons. They said they would check in to it. Later they said that all the 40 gallon heaters had been recalled. So, if I agreed, they would install the 50 gallon water heater and not charge for the water heater for six months. Of course, nothing was put in writing. The next bill reflected the change in status, but there was an increase rather than a free month. There are only two of us, so a 40 gallon would have been more than adequate.
Replacing the furnace was never on my mind, so, this whole situation came out of the blue and I was far from prepared for the sales tactics. Since then I have been bombarded with notices from Direct Energy with offers of rebates or buy backs.
I still do not understand why he had to pick up the paperwork rather than I just stuff it in an envelope and send it myself. Within 24 hours I got the notification that I had a service plan. I was told by the technician that did the service, that the service plan would be cancelled and the sales guy also agreed. I never indicated that I wanted a service plan. The whole indication that the limited options I had included a warranty that included a maintenance plan, why would I want another?
After the installation I was called saying that as a new customer I was to be given a service plan for four months for free. If I did not cancel, it would be automatically renewed. I cancelled immediately, but they ignored that request and billed. They also added a service plan for the air conditioner, which I also did not ask for.
So, from purchasing a furnace and air conditioner for $4,500 in 2001 I find that only thirteen years later that I have to replace it for almost two and a half times the price, $11,500, with no idea of what the equipment really cost.
From Oct 2014 till Christmas, I was laid up with knee problems. I could not do much but I was able to think about how I had been taken by Direct Energy. Not being mobile and tired of the lies, I wrote an email so that I would have something in writing. I did get two phone calls, but not being mobile and thanks to the pain, not able to answer the phone, I could not do anything until later. When I did call back on the number given, I got an answering machine. Rather than the typical, leave a message, it wanted me to set up voice mail. I had slightly more success with the Twitter account, but nothing more than acknowledgment of the complaint. The last was three weeks ago when they asked which email address I used. I told them then heard nothing,
It has been almost two years and I have yet to get a request to schedule a maintenance call on the equipment I bought or the service plan I did not ask for. I did receive a letter from Direct Energy last week, but it was more snake oil as they tried to con me into a service plan for plumbing.
Still waiting. Almost two years since they signed me up for a pair of service plans I did not ask for and they have yet to schedule an inspection or answer any of my emails.
Back in December, service from my ISP was less than tolerable, so I switched to Bell. At the time I was convinced to “upgrade” to Fibre from satellite. I had had satellite for a number of years, but despite the doom and gloom from the cable company, I had very few weather related outages. When it did happen, the outage was in minutes, unlike the weather related outages on cable where it lasted days. Cable gets wet and it would take days for the cable to dry out or for them to find the short. Besides, from the beginning, the signal quality was far superior.
So, other than a higher capacity PVR and more lines to record, Fibe falls short of what Bell satellite offered.
– There is no Knowledge TV on Fibe, so I lost a source of British shows. Not Bells fault, but the offering of British shows on BBC Canada is appalling. There appears to be far more “Canadian Content” than on the American channels or other specialty language channels. Thank you CRTC.
– There is no slo mo. On the satellite I was able to slow the action down to see what I missed. Sometimes it was just as simple as trying to read a note that the good guys are reading. The camera may pan on the note, but sometimes it is too fast.
– Certain shows on TV Polonia can record as series on the satellite, but Fibe treats the same series as a non series and individual shows have to be recorded. So, every two weeks, the next crop of episodes have to be recorded.
– For some reason, the CTV News has to be treated as three separate series, noon, 6pm and 11:30pm. Satellite treated them as a single show. There is no indication of any of the “series” on the PVR to indicate that it is the noon, 6pm or 11:30 pm collection. So, if the news is preempted due to some silliness in the US, then it is fun and games trying to find the last news episode. With Satellite, it was simple, it was the last one in the group.
– In the PVR, the series setting will say that there i an episode to be recorded, but no details. On the satellite, there are details about the time and episode.
Even though Fibe is running on Windows CE, Bell has a bias towards Microsoft. Though there is an IOS and Android app for Fibe, there is no app for the company that introduced tablets many years ago. So, the answer for a Windows user is to buy an IOS or android device or rent a set top box if they want a second receiver.
The ads for rewind on Fibe are bogus. Only select channels can rewind and they are not consistent in how or for how long. Some shows are marked and if you catch them before they end, you can go back to the beginning. Other shows you have to go to a different channel (1000) and select shows may be around for a few weeks. These shows do not allow FF to skip commercials. …and yes, the On Demand shows have commercials. If you missed the news, you can not rewind. If you did not record it, you missed it.
As a dutiful husband I have been manually recording shows while my wife was away. So, on her return I queued up what I thought was the oldest show of her favourite series, it turned out that it was the second newest and in this episode, all the cast was killed. Maybe JR did it? I have no idea why the series continued without the cast, but it was a soap opera. My new issue is that you can select the shows by date or by name, BUT… if you chose by name, there is no secondary sort, so the last one in the list is NOT the oldest show. Even a first year programmer understands that lists may need more than a one sort criteria.
John Marshall… Visio MVP Visio.MVPs.org
One of the first gotchas for new Visio developers is the UnGroup command.
Visio shapes are simple, they can have one colour and one line type. To make a traffic light, you need to group a red circle, yellow circle and a green circle. When grouped, Visio will take a collection of shapes and create a new shape with a group section and a shape collection of the shapes selected. To ungroup, the shapes are released from the collection and the group shape is deleted. The process is reversible, some times. Shape developers learned early on, that this new shape was like any other shape and could have other sections added to it. Shape Data, User Data, Connections, Control Handles etc. Unfortunately, when these shapes are ungrouped, these extra sections are not preserved. So knowing this why would you ever want to ungroup one of these these? You can always subselect or use the Drawing Explorer to get access to one of the sub shapes. Welcome to one of the other gotchas, the bounding box. Sometimes you have to ungroup, and create a group with a more appropriate bounding box. You can go bigger by adding a temporary shape of the desired size, lock the group from recalculating the bounding box and delete the temporary shape, but you can not go smaller without Ungrouping. You would then create a shape of the correct size, group it and before adding the other shapes to the group, lock the group shape from recalculating. The final cleanup would be to add back the component shapes and delete the temporary shape.
Early on Graham Wideman showed me a way to remove VBA projects from a Visio solution. Deleting the VBA only got you part of the way, there was still a Project stub that made Visio think the file contained a VBA solution. His solution was to edit the XML version of the file and delete the stub.
For the past few months I have had problems trying to run any of the Windows 10 UWP samples. Each attempt resulted in hundreds of errors. Yesterday, thanks to Colin Melia and a little Google spelunking I may have found the issue and the solution.
The Googling turned up https://github.com/Microsoft/Windows-universal-samples/issues/182 which indicates the same issues and that the problem may be with one of the references, Microsoft.NetCore.UniversalWindowsPlatform. Since I have been having issues, I did a clean install and installed the Windows 10 SDK. The issue appears to be that the samples were created with the 5.0 version of that file, but the clean install used 5.1. So when trying to open the samples, the reference could not resolve.
The solution was to open the project, in the Solution Explorer, right click reference and chose Manage NuGet Packages… Select Microsoft.NetCore.UniversalWindowsPlatform and select Update. I was able to do a Clean Project and Run.
No more errors!
Hopefully this will work for others.
Remember, if your solution contains more than one project, you probably will have to do this for each project.
John Marshall… Visio MVP Visio.MVPs.org