Readerwmf, Clipboard and Visio
#2
I have tried to copy shapes from Visio 2010 into latest version of Paste2Xaml and everything works here.

You can also try with the latest version - you can install the evaluation version even with installed commercial version (in installer you will need to manually select the ReaderWmf). Because the evaluation version is installed in different folder, this will preserve your commercial version.


But I suspect that the problem is in how you get the hemf of metafile.

Why you do not use the GetGeometryFromClipboard method - it will read the metafile from clipboard for you. It is also used in Paste2Xaml - actually there the GetFromClipboard is used, but this is almost the same just that it reads metafile as Shapes.

This method uses a more low level approach to get hemf (there are some other checks in the code):

Code:
isClipboardOpened = Ab2d.Common.User32Wrapper.OpenClipboard(IntPtr.Zero);

if (!isClipboardOpened)
    throw new ExternalException("Cannot open clipboard!");

hemf = Ab2d.Common.User32Wrapper.GetClipboardData(Ab2d.Common.User32Wrapper.CF_ENHMETAFILE);
Andrej Benedik
  


Messages In This Thread
Readerwmf, Clipboard and Visio - by acaptcha2 - 01-05-2016, 12:27 PM
RE: Readerwmf, Clipboard and Visio - by abenedik - 01-05-2016, 09:33 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)