Is there a way to export the .edmx diagram from VS2008 to Visio? - entity-framework

Some people want to see the DB structure and dont have VS, is there a way to do this? Or any other way to export it outside of a screencapture (it is a huge diagram).
Thank you.

You can right click on the design surface and select Diagram -> Export as Image and you get the entire edmx model generated as bmp

This doesn't really work on large diagrams. Oh it exports it, but on a large diagram, once you zoom in, all text is nothing but pixels. It's a logged bug, but right now Microsoft is not planning on fixing this issue.
What I've done is downloaded a pdf printer (like Bullzip free edition), then just "print" the document to pdf.
To Viso, no. I have yet to find a way to export this to Visio.

There is a PDF generation solution (suitable if you have large diagrams) :
You can do it from Visual Studio :
File > Print
Send it to OneNote or choose PDF.

Related

Visio .vsdx format unzip and zip corrupts

I'm attempting to modify a Visio file (Open XML format) without having to use the Windows Visio application. My first experiment is just to use 7zip to unzip a known good .vsdx file that was created using Visio. That is all good; I can view the content of the package. Without making any modifications, I use 7zip to re-zip the content and renamed to .vsdx, but when I tried to open the resulting new file using Visio, it complains that the file is corrupt. Is there a way to manually re-zip the content into something that Visio accepts as a valid Visio file? I suspect that there may be some sort of checks for the validity of the file, but can't find what that may be. Thanks for any input.
I would use some form of OpenXML library to get at the file's guts using some sort of "approved magic".
Understanding that you might not want to do whatever you're doing via programming, I looked for some sort of free editor.
I found this free plug-in for Visual Studio:
https://marketplace.visualstudio.com/items?itemName=bsivanov.OpenXMLPackageEditorforVisualStudio
It works in the free "Microsoft Visual Studio Community 2019" as well. I just opened the dev environment (aka: the application) and dragged a Visio .vsdx file into the app. It opened with a tree-like editor. I was able to dig down until I found the visio > pages > page1.xml "leaf". Inside there, I was able to change some text on a shape, then save the "package".
Whatever this tool does, it saves the file properly, and I was able to open the altered .vsdx file in Visio. And the text that I changed in the editor was indeed changed inside of Visio!
I think I've used this in the past:
"Welcome to the Open XML SDK 2.5 for Office"
https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk
https://github.com/OfficeDev/Open-XML-SDK
To edit Visio files without the Visio application, you'll still need to understand how Visio works, to some extent.
A simple example:
I changed the text on a shape fairly easily within one of the page.xml files. That was easy. Then I wanted to add a copy of that shape. It was simple enough to copy and paste the whole xml block for the existing shape, then change the PinX and PinY attributes to move the shape to a different location on the page.
But you won't see that shape unless you give it a unique ID within the page. I tested deleting the ID attribute (to see if Visio would figure it out on open and assign one automatically), but it didn't work. If the ID is the same as another shape, the shape is ignored when you open the file. Once I changed ID to something unused, I did see the new copy of the shape.
If you create grouped shapes, or shapes that have advanced behavior (SmartShapes, ShapeSheet formulas, etc.), then this could get complicated. As formulas need to reference other shapes by ID, so you need to manage the IDs! For simple boxes and lines, etc., it might work well (and fast) to generate these things via OpenXML. Good luck!

How to convert cgm to png on windows

I want to convert a .cgm file to an image file (.png) on windows.
Are there any freeware/opensource tools for this? I tried to ImageMagik but it does not support this operation. Commandline inteface will be an added advance if any of the tools provide it.
UniConvertor is open source, and the best choice in my opinion.
The windows binaries worked great for me, https://sk1project.net/uc2/download/
From a command line you'd simply type uniconvertor input.cgm output.png
You can try https://cortona3d.com/en/cortona2d-viewer-download. When installed it understand .cgm extension and directly opens in IE and you can view it/or take snapshot.
Other tool that you can try(but not free) is reaConverter(https://www.reaconverter.com/)
It has a nice command line interface that converts cgm to PNG directly
There is a free tool available XnView which is very handy when it comes to view, resize and edit your images. It supports more than 500 different formats. But you will have to download an additional plug-in https://www.cadsofttools.com/products/plugins-for-3d-party-programs/ It will enable your need to deal with CGM file formats.

Illustrator add class to svg group

i have searched from hours to find a solution to export a SVG with class on the group element. Is it possible this thing?
I have found a program inkscape which can edit in XML mode and add the attribute. The problem is that inkscape insert too much garbage code to use in the web.
Can it be done in illustrator or program in which the SVG stays with clean code.
Edit - 06.12.2015
For now there is not a good program solution, the best tool to do is inkscape.
For this to work you need to use the XML ediotor in the program, so it is not very user friendly also it includes too much markup in SVG.
This is an explanation by Adobe on how to export SVG from Illustrator CC.
they don't mention classes though.
how about ID's? might be equally useful
Illustrator wraps every layer in a g element that gets his ID from the layer's name.
you could use it to construct your svg accordingly and get each group of elements with the id you want.
the latest version of AI spits pretty clean code I think.
but you could use an online tool to optimise it.

Enabling Apps For Office in Microsoft Word 2013

I am working to import a visio diagram from a vsdx file which has multiple pages, and it seems there is an app on the office store site to help me with this. Problem is Office Apps is currently disabled in my install of Office Word 2013. How do I enable this please so my apps can load? Thanks in advance
A possible solution:
1)Click file to get to the backstage menu.
2)Then click options
3)Then click trust center
4)Bottom right is trust center options
5)Then click trusted app catalogs on the left selection pane.
6)Look at the check boxes and see if any of those are checked. If so un-check.
You can use Insert->Text->Object->Create from File to import your Visio diagram. The imported object can only display one page at a time, however, but you can double click it to edit and display it in an embed Visio window.
I think the more general approach is export your diagram to some graphic formats and insert to the document. When you make change to the diagram, just export it again, go back to Word, right click on the image and Change picture.
This is probably late, but I had the same problem. What worked for me was going to File in Word and converting the format to a newer format. It had been running in Compatibility Mode because the file I opened in Word 2013 was actually created on Word 2002. So I had to convert it to the 2013 updated format, then save the file after converting, and then the Apps button was enabled! Presto! I hope this helps anyone who comes across the problem. I had NO clue what to do until I read online somewhere.

How to export data from Chrome developer tool?

Network analysis by Chrome when page loads
I would like to export this data to Microsoft Excel so that I will have a list of similar data when loaded at different times. Loading a page one time doesn't really tell me much especially if I want to compare pages.
if you right click on any of the rows you can export the item or the entire data set as HAR which appears to be a JSON format.
It shouldn't be terribly difficult to script up something to transform that to a csv if you really need it in excel, but if you're already scripting you might as well just use the script to ask your questions of the data.
If anyone knows how to drive the "load page, export data" part of the process from the command line I'd be quite interested in hearing how
from Chrome 76, you have Import/Export buttons.
I was trying to copy the size data measured from Chrome Network and stumbled on this post. I just found an easier way to "export" the data out to excel which is to copy the table and paste to excel.
The trick is click Control + A (select all) and once the entire table will be highlighted, paste it to Microsoft Excel. The only issue is if there are too many fields, not all rows are copied and you might have to copy and paste several times.
UPDATED: I found that copying the data only works when I turn off the filter options (the funnel-looking button above the table). – bendur
Right-click and export as HAR, then view it using Jan Odvarko's HAR Viewer
This helps in visualising the already captured HAR logs.
I came across the same problem, and found that easier way is to undock the developer tool's video to a separate window! (Using the right hand top corner toolbar button of developer tools window)
and in the new window , simply say select all and copy and paste to excel!!
In Chrome, in the Developer Tools, under Network, in the Name column, right-click and select "Save as HAR with content". Then open a new tab, go to https://toolbox.googleapps.com/apps/har_analyzer/ and open the saved HAR file.
Note that ≪Copy all as HAR≫ does not contain response body.
You can get response body via ≪Save as HAR with Content≫, but it breaks if you have any more than a trivial amount of logs (I tried once with only 8k requests and it doesn't work.) To solve this, you can script an output yourself using _request.contentData().
When there's too many logs, even _request.contentData() and ≪Copy response≫ would fail, hopefully they would fix this problem. Until then, inspecting any more than a trivial amount of network logs cannot be properly done with Chrome Network Inspector and its best to use another tool.
You can use fiddler web debugger to import the HAR and then it is very easy from their on... Ctrl+A (select all) then Ctrl+c (copy summary) then paste in excel and have fun
I don't see an export or save as option.
I filtered out all the unwanted requests using -.css -.js -.woff then right clicked on one of the requests then Copy > Copy all as HAR
Then pasted the content into a text editor and saved it.
I had same issue for which I came here. With some trials, I figured out for copying multiple pages of chrome data as in the question I zoomed out till I got all the data in one page, that is, without scroll, with very small font size. Now copy and paste that in excel which copies all the records and in normal font.
This is good for few pages of data I think.
In more modern versions of Chrome you can just drag a .har file into the network tab of Chrome Dev Tools to load it.
To get this in excel or csv format- right click the folder and select "copy response"- paste to excel and use text to columns.
You can try use Haiphen, which is a chrome extension that allows you to analyze network traffic and what API calls a web application is making.