Author Topic: Copy master to clipboard- paste shortcut to a stencil - error  (Read 7867 times)

0 Members and 1 Guest are viewing this topic.

Eva

  • Jr. Member
  • **
  • Posts: 21
I have a strange issue with Visio 2016 on windows 10 machine. The same thing works ok in Windows 7 environment. When I copy some master from a stencil to the clipboard and then try "paste shortcut" to another stencil,  Visio either crashes or gives an error message: "An error (1) occurred during the action Paste Shortcut. Unexpected end of file." The same error occurs with any masters. I have tried this on two different machines, and both have the same error. I tried to find out if someone else had the same error, but I did not find anything. Does anyone know why this fault comes?
Thanks,
Eva

Surrogate

  • Hero Member
  • *****
  • Posts: 1318
    • ShapeSheet™ Knowledge Base
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #1 on: April 21, 2017, 03:01:05 AM »
you can read about Error #1 this article - Article 27. "Information catharsis", via google transtate
you can find how fix this error in this thread An error (1) occurred during the action Copy
But these methods can work only with Visio 2010 and older versions  :-[
Newest versions don't support xml conversion !
« Last Edit: April 21, 2017, 03:36:39 AM by Surrogate »

Eva

  • Jr. Member
  • **
  • Posts: 21
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #2 on: April 21, 2017, 04:22:15 AM »
Thanks for the quick response but the active Visio drawing has nothing to do with this error, and that's why the fix does not help in this case. The same fault will also come with a new, empty vision drawing and with any master. I also tried to disable all addins.

Surrogate

  • Hero Member
  • *****
  • Posts: 1318
    • ShapeSheet™ Knowledge Base
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #3 on: April 21, 2017, 04:27:53 AM »
Eva, please describe all your steps. And share your documents.

Eva

  • Jr. Member
  • **
  • Posts: 21
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #4 on: April 21, 2017, 04:39:24 AM »
1. I create a new blank drawing in Visio 2016 in Windows 10 computer
2. I select More Shapes - General - Basic Shapes
3. I select for example Rectangle master and Copy it to clipboard
4. Then I select More Shapes - New Stencil (Metric)
5. On the new stencil, I right-click and select "Paste Shortcut"
6. Visio shows an error message: An error (1) occurred during the action Paste Shortcut. Unexpected end of file.
Sometimes Visio has crasched without any message.

I tried this also one colleague's machine with the same result.

Surrogate

  • Hero Member
  • *****
  • Posts: 1318
    • ShapeSheet™ Knowledge Base
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #5 on: April 21, 2017, 04:46:14 AM »
Why you paste that master as shortcut ? Not as master ?

UPDATE: in my case all these steps works !
« Last Edit: April 21, 2017, 04:49:22 AM by Surrogate »

Eva

  • Jr. Member
  • **
  • Posts: 21
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #6 on: April 21, 2017, 04:54:44 AM »
I have two reasons:
1. Shortcut takes less disk space when the stencil is saved
2. Shortcut will stay up-to-date, if the original shape is modified

Surrogate

  • Hero Member
  • *****
  • Posts: 1318
    • ShapeSheet™ Knowledge Base
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #7 on: April 21, 2017, 05:02:43 AM »
1. Shortcut takes less disk space when the stencil is saved
In these days HDD have big volumes
2. Shortcut will stay up-to-date, if the original shape is modified
in my case, i can paste as shortcut only build-in masters from MS provided stencils. but when i try paste as shortcut custom master my visio application falls !

Yacine

  • Hero Member
  • *****
  • Posts: 2737
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #8 on: April 21, 2017, 05:06:43 AM »
??? That's not how stencils were meant to be used.
Actually the stencil should be the original storage place for shapes to reuse, not external files with links in the stencil.
You may have just found the reason for the crashes.
Yacine

Eva

  • Jr. Member
  • **
  • Posts: 21
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #9 on: April 21, 2017, 05:26:39 AM »
The reason why I use this is that I maintain an Visio add-in which has a search feature. With this feature the user can write some keywords in Excel and then search for the masters containing these words. The feature copies the shortcuts of the found masters to a new stencil, and the user can then use this stencil as a quick way to find all the needed masters. In previous Visio versions, this has worked well and works also with Visio 2016 on Windows 7.

Surrogate

  • Hero Member
  • *****
  • Posts: 1318
    • ShapeSheet™ Knowledge Base
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #10 on: April 21, 2017, 05:31:17 AM »
In my case Visio 2010 & Win7 this hint dont work

Yacine

  • Hero Member
  • *****
  • Posts: 2737
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #11 on: April 21, 2017, 06:45:21 AM »
The reason why I use this is that I maintain an Visio add-in which has a search feature. With this feature the user can write some keywords in Excel and then search for the masters containing these words. The feature copies the shortcuts of the found masters to a new stencil, and the user can then use this stencil as a quick way to find all the needed masters. In previous Visio versions, this has worked well and works also with Visio 2016 on Windows 7.
Guess you were not happy with the built-in search function.
« Last Edit: April 21, 2017, 06:47:56 AM by Yacine »
Yacine

Yacine

  • Hero Member
  • *****
  • Posts: 2737
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #12 on: April 21, 2017, 06:49:21 AM »
If direct pasting of a shortcut does not work anymore, you may investigate the possibility to insert a blank master and modify it programmatically afterward?
Yacine

Eva

  • Jr. Member
  • **
  • Posts: 21
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #13 on: April 21, 2017, 07:22:28 AM »
I am not happy with the built-in search function, because I haven’t found any way to search shapes in my own stencils. The built-in search only search for shapes that are installed with Visio?

Now I tried to change the feature so that it I use "paste" instead of "paste shortcut".  This seems to work, but now the found masters are copies, not links any more, and if the original master is updated, the copy becomes obsolete.

Yacine

  • Hero Member
  • *****
  • Posts: 2737
Re: Copy master to clipboard- paste shortcut to a stencil - error
« Reply #14 on: April 21, 2017, 02:11:43 PM »
When a user drops the master on the drawing a local copy is made anyway. A change in the original master will not affect the dropped instances. I wouldn't know for a mechanism that keeps the link alive.
And as the "help"-stencil is generated dynamically, the should not be a problem with obsolete masters.
Yacine