Visio Guy

Visio Discussions => General Visio => Topic started by: haggis999 on January 16, 2017, 11:36:36 PM

Title: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 16, 2017, 11:36:36 PM
I am running a one month trial of Visio Professional 2016. About a week ago, I had no problems importing SVG files into Visio, but today I got the following error message every time I attempted to insert such a file. I even got this error when I tried to insert an SVG file, created in Adobe Illustrator, that contained nothing but a single rectangle.

          Import of image file failed: 'xxxxxxxx.svg'

Despite this error, the imported drawing does actually appear on the Visio page, but it is unselectable, and thus unusable. My best guess is that I have accidentally changed some setting in Visio. Any assistance would be greatly appreciated.

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: JuneTheSecond on January 17, 2017, 05:03:46 AM
If you did it in the menu, insert image,
then you would try with files/open image files.
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: Paul Herber on January 17, 2017, 08:55:23 AM
I wonder if this might be a recent Windows update that is causing the problem. There's no Visio setting I know of that might cause that problem. However, find the shape in the Drawing Explorer window, open the shapesheet and check the shape's protection settings.

Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 17, 2017, 02:32:10 PM
Quote from: Paul Herber on January 17, 2017, 08:55:23 AM
I wonder if this might be a recent Windows update that is causing the problem. There's no Visio setting I know of that might cause that problem. However, find the shape in the Drawing Explorer window, open the shapesheet and check the shape's protection settings.
Hi Paul,
Can you please be a bit more specific about what look for in the shapesheet. What settings do you mean by 'protection settings'?

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 17, 2017, 02:37:03 PM
Quote from: JuneTheSecond on January 17, 2017, 05:03:46 AM
If you did it in the menu, insert image,
then you would try with files/open image files.

I'm sorry, but I don't really understand your suggestion. I can only open Visio files via the File/Open method. It offers no alternative way to import an SVG file into an existing Visio file.

Please clarify.

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: Paul Herber on January 17, 2017, 03:04:13 PM
menu Insert -> Picture

Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 17, 2017, 04:29:57 PM
Quote from: Paul Herber on January 17, 2017, 03:04:13 PM
menu Insert -> Picture
That is indeed the method I have been using to import SVGs. There is no other way, as far as I know.

I have just re-read JuneTheSecond's post and realise that I probably misunderstood what was being said. It was simply requesting confirmation that I was importing SVGs in the correct manner.

What about my request for clarification of your own post?

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: Paul Herber on January 17, 2017, 04:38:11 PM
Quote from: haggis999 on January 17, 2017, 02:32:10 PM
Quote from: Paul Herber on January 17, 2017, 08:55:23 AM
I wonder if this might be a recent Windows update that is causing the problem. There's no Visio setting I know of that might cause that problem. However, find the shape in the Drawing Explorer window, open the shapesheet and check the shape's protection settings.
Hi Paul,
Can you please be a bit more specific about what look for in the shapesheet. What settings do you mean by 'protection settings'?

David

There's a whole section called Protection in the shapesheet editor. In particular, a cell called LockProtect. This is also available from the Developer -> Protection menu.

Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 17, 2017, 05:25:37 PM
Quote from: Paul Herber on January 17, 2017, 04:38:11 PM
There's a whole section called Protection in the shapesheet editor. In particular, a cell called LockProtect. This is also available from the Developer -> Protection menu.
I opened a blank page and repeated an attempt to import an SVG. As before, there was an error message and the shape was locked. However, I drilled down into that page in the Drawing Explorer and randomly selected one of the shapes. This time, I found a Protection section, whose entries were all set to zero, but none of them were named LockProtect. 

I then went back to my new page and tried to open up the Developer/Protection dialogue box, but this option was greyed out. However, it was activated when I clicked on the imported shape (even though there was no visible indication that the shape was selected). None of the Protection checkboxes were selected and none of them had a name obviously related to a LockProtect setting.

My problem may well be due to a recent update to Windows 10. I was taken by surprise by an unexpected reboot triggered by Windows Update when I was away from my PC a few days ago. Visio 2016 was open at the time.

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 18, 2017, 11:51:37 AM
I ran a 'Quick Repair' on my trial Visio 2016 installation, but it didn't fix my problem. I then ran the more thorough 'Online Repair' option that is claimed to fix all installation errors. Once again, it made no difference. I still get the following error as soon as I try to insert an SVG file.

         An error(1) occurred during the action Insert Picture.
         Import of image file failed: 'xxxxxxxxxx.svg'

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: Paul Herber on January 18, 2017, 11:57:37 AM
Have you tried importing other image types? GIF, JPEG, BMP, PNG, WMF, EMF?
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 18, 2017, 12:34:34 PM
Importing jpegs is no problem, but my primary requirement is to import a vector drawing format, such as SVG. This used to work fine just a week or so ago, so something has changed.
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 18, 2017, 02:57:40 PM
It is possible that when I recently re-saved my Illustrator drawings in SVG format I used slightly different options than in the past.

For the record, here are the settings I am now using in Illustrator's SVG Options dialogue box. All other optional settings are turned off.




















SVG Profiles:SVG 1.1
Font Type:Adobe CEF
Subsetting:All Glyphs
Image Location:Embed
Preserve Illustrator Editing Capabilities:Yes
CSS Properties:Presentation Attributes
Decimal Places:3
Encoding:Unicode (UTF-8)
Use <textPath> element for Text on Path:Yes
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: wapperdude on January 18, 2017, 03:12:11 PM
Have you tried an old svg that was known to insert Ok?  That should rule out any changes.  Try it on both a new blank Visio file and an older Visio file known to be Ok.  Should work, both cases.  If not, would seem to be a Visio issue.  I would do a complete uninstall re-install.

I'm assuming you've looked at an old Visio file and the existing svg in the file still behave ok.

Wapperdude

Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 18, 2017, 03:29:00 PM
Quote from: wapperdude on January 18, 2017, 03:12:11 PM
Have you tried an old svg that was known to insert Ok?  That should rule out any changes.  Try it on both a new blank Visio file and an older Visio file known to be Ok.  Should work, both cases.  If not, would seem to be a Visio issue.  I would do a complete uninstall re-install.

I'm assuming you've looked at an old Visio file and the existing svg in the file still behave ok.

Wapperdude
The primary SVG that I have been using is an old one that was previously inserted. That previous insert still behaves as expected and its component parts are still editable, but I can no longer re-insert that same SVG. My attempts to insert simple or even blank SVGs have failed with the same error as before.

As previously mentioned, I have already done a full online repair, but I will now try a complete uninstall and re-install.

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 18, 2017, 03:56:35 PM
I have now uninstalled Visio, rebooted my Windows 10 PC and then re-installed Visio from scratch. However, this has NOT fixed my problem!

I can't think of anything else to try, so more suggestions would be very welcome.

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: Paul Herber on January 18, 2017, 04:44:13 PM
Try importing the attached SVG file. See if that works. This file was generated from Visio 2010.
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 18, 2017, 04:56:33 PM
Quote from: Paul Herber on January 18, 2017, 04:44:13 PM
Try importing the attached SVG file. See if that works. This file was generated from Visio 2010.
Your SVG can be inserted without any problem. That obviously tells us something, but I'm not quite sure what...

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: Paul Herber on January 18, 2017, 04:58:25 PM
Try resaving one of your Illustrator files (just as a test) but use a TrueType font.
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 18, 2017, 05:05:00 PM
I've just tried using the 32-bit version of Illustrator and tried a few adjustments to the SVG options I hadn't done before. None of that worked, so I tried unchecking 'Preserve Illustrator Editing Capabilities' (I hadn't tried this before, as I wanted the elements of the SVG to be editable within Visio).

That appears to have resolved my problem
! The SVG also appears to still be editable within Visio.

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: Paul Herber on January 18, 2017, 05:14:25 PM
 8) And so we learn ....
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: haggis999 on January 18, 2017, 05:26:18 PM
Quote from: Paul Herber on January 18, 2017, 05:14:25 PM
8) And so we learn ....
Thanks for your help along the way, Paul.

BTW, reverting to 64-bit Illustrator made no difference. The key factor was unchecking 'Preserve Illustrator Editing Capabilities'.

Rather oddly, however, I noticed that the import of the SVG saved from the 32-bit version had a slightly lighter background grey fill. In both cases, the SVG was saved from the identical .ai Illustrator file. It's not a serious issue, but do you know of any reason why the change from 32 to 64 bit would alter the colour settings?

David
Title: Re: 'Import of image file failed' error when trying to insert SVG file
Post by: Paul Herber on January 19, 2017, 04:51:24 PM
No idea, should be no difference in colour depth. Maybe a different rendering engine.