Archi Forum

Archi => General Archi Discussion => Topic started by: johmut on May 09, 2022, 08:36:46 AM

Title: Paste in Visio not working?
Post by: johmut on May 09, 2022, 08:36:46 AM
Our organisation switched to O365 Click-to-Run applications. I can no longer copy views from Archi (copy as image to clipboard) and paste into Visio? I get all the boxes and the lines but no colours and no text, except for the text on named relations? Paste Special only shows only one option: "Device Independent Bitmap", with the result described above. When I paste the same clipboard into Paint or PowerPoint, I do get the View as a picture with all colours and texts. When I then copy the picture from PowerPoint and paste it into Visio, it appears correctly...
I understand this is likely a Visio issue but is there a workaround other than passing through another app?

(I am using Archi Version 4.9.3 Build 202203221030 and Visio Version 2202 Build 14931.20274)
Title: Re: Paste in Visio not working?
Post by: Xiaoqi on May 10, 2022, 17:45:54 PM
If you paste as image, my understanding is you're not intending to have model element information in Visio, right? Then, possible you can use screen-capturing tool to snap the area of image screen then paste special into Visio.
Title: Re: Paste in Visio not working?
Post by: Phil Beauvoir on May 10, 2022, 17:59:14 PM
Quote from: johmut on May 09, 2022, 08:36:46 AMI get all the boxes and the lines but no colours and no text, except for the text on named relations?

I don't know how that is possible. In the Archi/Eclipse code, a BMP image is created from the raw image data and copied to the system clipboard. This image data could be anything, not just boxes and lines (for example, diagram objects that have images). Perhaps Visio has some strange image recognition that filters only boxes and lines?
Title: Re: Paste in Visio not working?
Post by: johmut on May 13, 2022, 13:00:09 PM
Hi Phil,

I don't understand it either. Can you try to reproduce? I attach screenshots of what I get: in Visio and in PowerPoint.
Visio Result (https://i.imgur.com/EfdEQU7.png)
PowerPoint Result (https://i.imgur.com/rGXA4RW.png)

Title: Re: Paste in Visio not working?
Post by: Phil Beauvoir on May 13, 2022, 13:32:07 PM
Quote from: johmut on May 13, 2022, 13:00:09 PMHi Phil,

I don't understand it either. Can you try to reproduce? I attach screenshots of what I get: in Visio and in PowerPoint.
Visio Result (https://i.imgur.com/EfdEQU7.png)
PowerPoint Result (https://i.imgur.com/rGXA4RW.png)

I can't try this as I don't have access to Visio.

It looks as if there is some text there, but washed out.

This could either be a bug in that version of Visio or Eclipse's generation of Windows BMP images needs to be updated. If it's an Eclipse issue, the only way they'll look at it is by filing a bug here (https://github.com/eclipse-platform/eclipse.platform.swt/issues) with a reproducible test case snippet that creates a suitable image, copies it to the clipboard, and pastes into Visio.
Title: Re: Paste in Visio not working?
Post by: johmut on May 13, 2022, 14:24:15 PM
Hi Phil,

I just checked and have the same result in InkSkape as in Visio, with a simple paste from Archi.
When I export as SVG, I can import in both Visio (fine) and InkSkape (better). SO it must have something to do with how vector graphics application paste from the clipboard IMHO. Paint and PowerPoint don't have this problem so it seems.

BTW: Is it possible to export to SVG with text as <Text> objects and not as <Path> objects?
Title: Re: Paste in Visio not working?
Post by: Phil Beauvoir on May 13, 2022, 14:25:46 PM
What happens if you copy and paste a Canvas View that contains images?

Actually, I can reproduce this in Inkscape. Images are OK, but text is always white, and fill colours are not rendered.
Title: Re: Paste in Visio not working?
Post by: johmut on May 13, 2022, 14:47:59 PM
Canvas View pastes fine in both Visio and InkSkape.
Glad you could reproduce.
Title: Re: Paste in Visio not working?
Post by: Phil Beauvoir on May 13, 2022, 15:33:36 PM
I've opened an issue:

https://github.com/archimatetool/archi/issues/842
Title: Re: Paste in Visio not working?
Post by: johmut on May 18, 2022, 11:45:54 AM
Hi Phil,

Can you please comment on: Is it possible to export to SVG with text as <Text> objects and not as <Path> objects?

Perhaps also good to know why I need to copy/paste into Visio? Our company uses line-style to visually differentiate objects elements based on validation status (dotted, dashed and solid). This is something I cannot achieve in Archi ...

BR,
Johan
Title: Re: Paste in Visio not working?
Post by: Jean-Baptiste Sarrodie on May 18, 2022, 11:49:54 AM
Hi,

Quote from: johmut on May 18, 2022, 11:45:54 AMCan you please comment on: Is it possible to export to SVG with text as <Text> objects and not as <Path> objects?

The issue with this is that it then becomes mandatory to export the whole font and embed it into the SVG, making them huge.

Quote from: johmut on May 18, 2022, 11:45:54 AMPerhaps also good to know why I need to copy/paste into Visio? Our company uses line-style to visually differentiate objects elements based on validation status (dotted, dashed and solid). This is something I cannot achieve in Archi ...

One related question: aside the rendering issue, I suppose that importing a SVG in Visio doesn't create real visio shapes, so how do you intend to work on the diagram then ?

Regards,

JB
Title: Re: Paste in Visio not working?
Post by: Phil Beauvoir on May 18, 2022, 11:55:16 AM
> The issue with this is that it then becomes mandatory to export the whole font and embed it into the SVG, making them huge.

There was also an issue with some fonts not rendering properly, that's why we changed it. I guess we could provide this as an option.


Title: Re: Paste in Visio not working?
Post by: johmut on May 20, 2022, 11:33:12 AM
Hi JB,

Re your question: I can Ungroup the shapes in Visio, select the rectangle of the element and change the line-type as needed.

@Phil Beauvoir: option would be great. Even better would be the option to set the line-style from Archi ;-)

KR,
JohMut