Hello All
In our side we have a lot of FTA in Visio.
I have seen in this forum it is possible to import FTA from visio file but with which type of visio file : dessin XML (*.vdx) or other one ?
Thank you in advance for your answer
Those scripts are using the Apache POI library and support only the .vsdx format.
Not 100% sure though what the difference between .vdx and vsdx really is :-)
Regards
Jan
Hello Jan
I have save my FTA in vsdx format but the script don't work
can you check with the file in example if ii is the good format and if no send me the file save in the good format
Thank you in advance
Best regards
Philippe
Hi Philippe,
what means "does not work here", the result is not good or it exist with an exception?
Note that its rathee tricky to get a FTA out of Visio, this is really something you would have to fine tune for your FTA drawings anyway.
Hello jan
I have this message error in the poi;js
it is link to this line
var XmlVisioDocument = POI.classloader.loadClass("org.apache.poi.xdgf.usermodel.XmlVisioDocument");
yes i want to adapt your script to import our FTA
Thank you for your help
Ok, where did you get the scripts and the required files, I mean, which article?
I will check my local files and we may compare.
it is in this discussion
Visio importer? : Ansys medini analyze Support (freshdesk.com)
Hi Philippe, that discussion just has the script, Alon is referring to a google drive that we used at that time to exchange the complete project which is necessary because the Visio importer requires a lot of Java libraries.
I will first try your example and then compile a project and attach it here if I can.
Philippe,
I checked my local version, ported a few things to version 22.1 and tested it with your sample. Well, this is you Visio:
And this is the import:
I would say, there is "potential" :-)
My findings:
- the script does not create edges yet
- the script cant import gates
- the script get id and name by cutting text into pieces and the Visio shapes have many different versions of text (with line break, without, no whitespace etc) so the events look all different
- last but not least, some warnings are printed to the console saying that lines (1d shapes) are found which connect to other 1d shapes instead of 2d shapes so I suspect that in the Visio file the lines go to borders of the shape, not the shape which make it more difficult
All in all there is still a lot of work to do and it unclear whether someone can really make it work.
Happy Scripting
It is a good news however on my side script don't work in 2020R2 and 2022R2. I have the error message in POI for this line
thank you for your help
Sure, as mentioned your version is not having the required POI files inside and may not be up to date.
Find attached my version (content should go to the scripts folder), please replace all old files.
Note: I had to split it due to size limitations, will post the second part with next post.
Second part
Hi Jan
it works
Have a nice weekend