Visio Guy

Visio Discussions => Visio 2013 Issues => Topic started by: Roger Billsdon on April 29, 2013, 05:39:47 PM

Title: File Locations
Post by: Roger Billsdon on April 29, 2013, 05:39:47 PM
Hi all

I've just upgraded to Visio 2013 and have hit a problem which I'm sure is due to some really simple mistake on my part.

In previous versions of Visio, stencils saved in a folder added using the "File>Visio Options>Advanced>File Locations" option would be shown to the user in options such as "More Shapes". I've also tried without success saving folder names directly into the Windows Registry database key "HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Visio\StencilPath".

Interestingly when a new drawing is created using the Visio 2013 SDK FlowChart template, my stencils are then listed by the "More Shapes" option. I can see no obvious reason why this should be. Also I can't find how templates are organised into categories such as Business, SDK, etc.

Any hints or comments would be much appreciated.

Many thanks
Roger Billsdon
Title: Re: File Locations
Post by: Paul Herber on April 29, 2013, 05:55:12 PM
Hi Roger, have you tried installing stemcils via a Windows installer and Visio Solution Publishing Tool?
However, just this morning I had an email from customer telling me that this doesn't work 100% in Visio 2013. Stencils do show in the More Shapes menu in new documents but not in old ones, presumably ones made in previous versions of Visio.
Title: Re: File Locations
Post by: Roger Billsdon on April 30, 2013, 06:55:48 AM
Hi Paul, Many thanks for your reply. I use .msi windows installer packages to install my .NET programs and their associated Visio templates and stencils but I don't use the Visio Solution Publishing Tool. I did look at the Publishing Tool but that was about 5 years ago and I can't remember why I decided against it. I think I'll check it out and the Visio 2013 SDK installer and FlowChart template to see what I can discover.
Best regards
Roger
Title: Re: File Locations
Post by: Paul Herber on April 30, 2013, 07:30:59 AM
Hi again. I've just found this from a blog tweeted yesterday by the Visio twitter account. It could be the reason for this problem:


"Filter for current drawing's units

Note: only affects US (and Canadian) users.

The More Shapes browse menu now filters its results based on your current drawing's unit selection, ensuring you choose a stencil with the correct units, resulting in shapes that look and behave great on your page. If your document is US, you will only see US stencils, and vice versa."


First, it's not going to affect only US and Canadian users, its going to affect drawings based on Imperial units (or US units as Visio calls them) i.e. inches, feet, yards, miles etc. Is the filtering based on the locale or the drawing units?

Second, not all stencils available outside Microsoft are in US and Metric versions. Are metric only stencils going to be totally invisible to US (and Canadian) users?

Has somebody not thought this through ?
Title: Re: File Locations
Post by: Roger Billsdon on April 30, 2013, 08:11:13 AM
Hi Paul, I totally agree it's not that simple. For example, I've customers in the USA who happily mix imperial page sizes with metric and imperial units of measure and in some designs dual inch/metric measurements are required.
Title: Re: File Locations
Post by: Paul Herber on April 30, 2013, 08:29:37 AM
Maybe someone who has Visio 2013 could try this:
Install a stencil that is only metric,  then create 2 new blank documents, one metric, one US units. Check the stencils available from the More Shapes menu.
Title: Re: File Locations
Post by: Roger Billsdon on April 30, 2013, 09:52:00 AM
Changing Page Setup>Page Properties>Measurement units from millimetres to inches enables stencils to be listed by the "More Shapes" option. However, with millimetre measurement units not even newly created metric stencils are listed. I've tried various different settings but can't seem to get stencils listed without the page inch measurement units.

Another irritation is if a multi-page document has some pages set to millimetre and some to inch units the user sees all or no stencils when selecting different pages.

Unless I'm missing something, in this regard Visio 2013 will be somewhat tedious and confusing for those working in metric units, i.e. most of the world!!
Title: Re: File Locations
Post by: Paul Herber on April 30, 2013, 10:13:42 AM
I feel this change should have been the other way around. Most of the world doesn't want or need to see US unit stencils, millions of people have no idea what an inch, foot, yard or mile is. The US needs both imperial and metric, but the metric conversion is going at a snail's pace, like a furlong per fortnight. Mind you, Iran, North Korea and terrorists use metric, so just be careful!

;)

Title: Re: File Locations
Post by: Roger Billsdon on April 30, 2013, 03:18:56 PM
Also there was the rather expensive mix-up back in 1998 on the Mars Climate Orbiter and Mars Polar Lander spacecraft when a navigation error caused the lander to fly too low in the atmosphere and it was destroyed. The error was traced to a sub-contractor on the NASA program who had used imperial units rather than the NASA-specified metric units!
Title: Re: File Locations
Post by: Paul Herber on April 30, 2013, 03:43:06 PM
Quote from: Roger Billsdon on April 29, 2013, 05:39:47 PM
Also I can't find how templates are organised into categories such as Business, SDK, etc.

This is done by the Published Component table in the MSI file, it's created using the Visio Solution Publishing Tool. Actually I create using the tool InstEd, then the table is filled by Visio Solution Publishing Tool, it complains if the table isn't there already. Why can it not create it itself?
Title: Re: File Locations
Post by: Roger Billsdon on May 07, 2013, 03:49:17 PM
Hi all
It seems stencils must be named with a "_M" suffix in order for them to be listed by the "My Shapes" menu option whenever the active page opened in Visio is not in imperial units of measure. To achieve this I've duplicated all my stencils named, with and without an "_M" suffix and made a few enhancements to my program code so that the appropriate stencil is selected.

This all seems an unnecessary irritation, unless I'm missing a cleaner alternative solution.

Best regards
Roger Billsdon
Title: Re: File Locations
Post by: Paul Herber on May 07, 2013, 05:57:13 PM
Is this only when the stencils are in the specified file location or does it also apply to published stencils? Using the published stencils method the stencils don't have to have the _M or _U ending for their final name.
Title: Re: File Locations
Post by: Roger Billsdon on May 10, 2013, 07:58:39 AM
Hi Paul
"Is this only when the stencils are in the specified file location or does it also apply to published stencils?"

Applies to both. I've tried various experiments, including the alternate names option provided in the Visio Solution Publishing Tool.

Stencils named without a "_U" or "_M" suffix are just listed when the active page is set to imperial units of measure. As far as I can find, stencils must be named with a "_M" suffix in order for them to be listed by the Visio 2013 "My Shapes" menu option when the active page is in metric units of measure.

Does your comment "Using the published stencils method the stencils don't have to have the _M or _U ending for their final name" indicate you've found a solution or does the comment refer to previous versions of Visio?

Also on a different but slightly related issue; has anyone found how to replace the folder icons that Visio use when templates are organised into categories?

Many thanks,
Roger Billsdon
Title: Re: File Locations
Post by: Paul Herber on May 10, 2013, 08:12:38 AM
I don't have Visio 2013 so I can't try anything. This is either a bug or a very badly thought out change to how Visio works.
My comment about the _M and _U suffixes was just that even if the file name does have this suffix then using the VSPT the file name seen by Visio and the user can be changed.
The folder icon - no, no idea.
Title: Re: File Locations
Post by: Roger Billsdon on May 10, 2013, 08:53:44 AM
Thanks Paul.
Title: Re: File Locations
Post by: Nikolay on May 10, 2013, 02:44:27 PM
Thank you for the information.

Checked with Visio 2013.
For me as well Visio 2013 does not pick up (published !) metric stencil unless its filename has suffix "_M" :o
Note that this does not apply to the name you see in the user interface (i.e. in UI you can have anything, but the filename MUST end with "_M")

This appears to be different from all previous versions..

About the category icon - no idea either. A while ago have digged through the VisioSDK MSI file to figure out how it sets it's category icon, found nothing (it does not seem to set anything)
It looks like the category icons are just hard-coded in Visio.
Title: Re: File Locations
Post by: Roger Billsdon on May 13, 2013, 06:05:15 AM
Hi Nikolai, Thank you it's great to have confirmation that it's not just me doing something silly. Let's hope Microsoft can provide a better solution soon.

The Visio 2013 SDK template categories only show the folder icon on my computer. Do you see something different or were you analysing a .msi file for an earlier version of the SDK? 
Title: Re: File Locations
Post by: Nikolay on May 13, 2013, 09:39:56 AM
Nope. I have the very same thing with Visio 2013 (standard folder icon).. It was different with previous SDKs / Visio though.
Title: Re: File Locations
Post by: Thomas Winkel on February 11, 2015, 11:20:59 AM
Hi,

I just want to ask if there is still no proper solution available for this problem?

We provide our (metric) shapes via SVN.
So they are located in a specific directory that is known to Visio via "File > Option > Advanced > File Locations".

This has never been a problem (Visio 2003 .. 2010).
Also Visio 2013 is working with the old stencil format (VSS).
But with the new format (VSSM) the stencils are not listed in the "More Shapes" menu.
As soon as I switch the measurement unit (Page Setup > Page Properties > Measurement units) from Millimeters to Inches it works (makes no sense for me because the stencils are metric).
Also the suffix _M works (after a Visio restart), but we do not like to rename the shapes.

Regards,
Thomas
Title: Re: File Locations
Post by: Eva on February 13, 2015, 06:38:04 AM
Hi,

I have similar problem, but I can't get it work even with the old file format (.vss).
If I set the document's page properties to metric, my stencils are not listed in the 'More Shapes' menu, unless I change the file name to *_M.vss, or change the page properties to US units.
Have you changed some 'options' settings to get it work with the .vss files?

Regards,
Eva
Title: Re: File Locations
Post by: Thomas Winkel on February 13, 2015, 03:45:21 PM
Hi Eva,

I checked it again and you're right, the Visio language makes the difference, not the stencil format.
German Visio: Stencils are listed
English Version: Stencils are hidden

Here is the same discussion in the Microsoft forum:
http://answers.microsoft.com/en-us/office/forum/office_2013_release-visio/the-visibility-of-metric-stencils-in-more-shapes/b1e00b25-bb56-4118-b724-8a0624cd286e
Btw. is this your request, Eva?

Regards,
Thomas
Title: Re: File Locations
Post by: Eva on February 13, 2015, 05:41:18 PM
Hi Thomas,

Thank you for your reply. Yes, this is my question over a year ago, when I first time noticed the problem. Then I decided to stay in Visio 2010
because there seemed not to be any other way than rename the stencils. But I can't avoid Visio 2013 for ever, so I have to find
some solution.

Does anyone know any good way to get own metric stencils visible without renaming them?

Regards,
Eva
Title: Re: File Locations
Post by: Yacine on February 13, 2015, 05:52:57 PM
Silly question, but isn't renaming the stencils already an acceptable solution?
One will usually not use so many different new stencils.
Title: Re: File Locations
Post by: Nikolay on February 13, 2015, 10:03:03 PM
Hmm..
Have just tested with German Visio (standard) - for me, it looks like it has the very same bug(?)

Stencils without "_M" at the end are simply not shown on metric drawings.
Title: Re: File Locations
Post by: Paul Herber on February 14, 2015, 12:48:43 PM
It's never even been compulsory to add the _M or _U on files to determine whether they are metric or imperial. I have stencils that contain a mixture of metric and imperial shapes.
Title: Re: File Locations
Post by: wapperdude on February 14, 2015, 04:52:04 PM
Sounds like a new,, well thought out feature.  Had to be deliberate!
Title: Re: File Locations
Post by: Thomas Winkel on February 14, 2015, 05:58:03 PM
Hi,

@Yacine:
Renaming is not on option because:
* It looks ugly and confusing in the More Shapes menu
* Existing documents will not find their assigned stencils
* We have a few tens of users an cannot bother them more than necessary
* On principle: All stencils are already specified as metric while created with "New Stencil (Metric)"
* It is not necessary, we will skip Visio 2013 (not only for that reason)

@Nikolay:
Strange, I checked it with a colleague: He can see the stencils, I can not.
He has Visio 2013 Professional German 32bit (installed over Visio 2010)
I have Visio 2013 Professional English 32bit (installed on a clean Windows)

Btw. funny that the "Measurement Unit" can be a time like second, week, etc...

Regards,
Thomas
Title: Re: File Locations
Post by: Nikolay on February 15, 2015, 08:28:43 AM
Quote from: Thomas Winkel on February 14, 2015, 05:58:03 PM
Renaming is not on option because:
* It looks ugly and confusing in the More Shapes menu
* Existing documents will not find their assigned stencils
* We have a few tens of users an cannot bother them more than necessary
* On principle: All stencils are already specified as metric while created with "New Stencil (Metric)"
* It is not necessary, we will skip Visio 2013 (not only for that reason)

Like most of life's problems, this one can be solved with bending (c) Bender  :D
I mean, at least points (1) and (2) can be solved by publishing stencils in setup: http://visguy.com/vgforum/index.php?topic=6286

(1) - you can specify whatever name you want, independently from physical file name (also duplicate it for _U and _M), and add them to a specific category
(2) - you can specify list of the "alternate names" for the stencils, so that they are found by the drawings, even if the physical file name changes.

Quote from: Thomas Winkel on February 14, 2015, 05:58:03 PM
@Nikolay:
Strange, I checked it with a colleague: He can see the stencils, I can not.
He has Visio 2013 Professional German 32bit (installed over Visio 2010)
I have Visio 2013 Professional English 32bit (installed on a clean Windows)

Not sure why.. Maybe it depends also on OS language - I've checked with English OS.
Title: Re: File Locations
Post by: Paul Herber on February 16, 2015, 12:31:00 AM
Quote from: Nikolay on February 15, 2015, 08:28:43 AM
Like most of life's problems, this one can be solved with bending (c) Bender  :D

This, of course, is good news everybody!
[fan]
Title: Re: File Locations
Post by: Thomas Winkel on February 16, 2015, 06:09:32 PM
Hi Bender ;D

you have really impressive projects, thanks for sharing!

Points 1 & 2: Is this only possible with your installer or also with "in-house" Visio features?
We distribute our stencils / templates and other stuff via SVN:
http://visguy.com/vgforum/index.php?topic=6220.msg25371#msg25371
There are updates nearly every day and with SVN the users are always up-to-date.
For the moment we would like to keep this proceeding.

Quote from: Nikolay on February 15, 2015, 08:28:43 AM
Not sure why.. Maybe it depends also on OS language - I've checked with English OS.
We both have English Windows 7.
Title: Re: File Locations
Post by: Paul Herber on February 16, 2015, 06:30:47 PM
You could create an installer file that sets up the files and paths so Visio knows where to find things, but then have SVN just update the actual files. I see no reason why that shouldn't work.
Title: Re: File Locations
Post by: Nikolay on February 16, 2015, 07:21:56 PM
The needed part here is publishing (via windows installer)
So that you can specify "alternate" or "user interface" names for the stencil/template files.

You could do that as well with Visio Solution Publishing tool from Visio SDK (will require a bit more efforts though).
But yep, installer might not quite fit in the SVN "xcopy" deployment scenario - you'll need an extra step to pack stencils/templates in the installer somewhere in the process.

In principle, well, you can have a "build server" somewhere which pulls the templates/stencils out of the SVN and builds the installer for "end-users".
Or you could do that packaging via SVN post-commit hook for example. Not sure if it all worth the efforts though.

As far as I understand, you have a corporate LAN and cannot move your files outside of the company.. right?
Title: Re: File Locations
Post by: Paul Herber on February 16, 2015, 08:32:24 PM
You'd only need to do the installation once, you could probably use dummy files of small size, once the MSI has run you could extract the real files from SVN at any time. A new update from SVN won't require the installer to be run again (unless you change filenames or something of course).