visual-studio 如何导出 Visual Studio 2010 UML 建模图

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1686767/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 11:11:34  来源:igfitidea点击:

How to export Visual Studio 2010 UML Modeling Diagrams

visual-studioumlvisual-studio-2010

提问by Mickel

I recently created a very nice UML Class diagram inside Visual Studio 2010 (b2). The tools worked like a charm and I was able to model a rather complex domain within minutes.

我最近在 Visual Studio 2010 (b2) 中创建了一个非常好的 UML 类图。这些工具就像一个魅力,我能够在几分钟内对一个相当复杂的域进行建模。

However, I cannot find any way to export my diagram as an image (PNG/JPEG/etc.).

但是,我找不到任何方法将我的图表导出为图像(PNG/JPEG/等)。

Does the modelling features in VS2010 support exporting diagrams as images? If so - how do I do it?

VS2010 中的建模功能是否支持将图表导出为图像?如果是这样 - 我该怎么做?

Print src is NOT the answer.

打印 src 不是答案。

Edit:Found one way to export... Go to File > Print and select Adobe PDF

编辑:找到一种导出方式...转到文件 > 打印并选择 Adob​​e PDF

Edit 2:Found another, slightly more elegant, way to export. In the diagram editor: Select all (Ctrl+ A), Copy (Ctrl+ C), Go to your favourite image editor (paint works fine) and Paste (Ctrl+ V). Voila!

编辑 2:找到了另一种更优雅的导出方式。在图表编辑器中:全选 ( Ctrl+ A)、复制 ( Ctrl+ C)、转到您最喜欢的图像编辑器(绘画效果很好)和粘贴 ( Ctrl+ V)。瞧!

采纳答案by Esther Fan - MSFT

The VS 2010 Ultimate RC documentation has more info about exporting the UML diagrams as images: How to: Save Images of Diagrams

VS 2010 Ultimate RC 文档提供了有关将 UML 图导出为图像的更多信息:如何:保存图的图像

回答by Esther Fan - MSFT

We now have a topic in the documention about how to do this programmatically:

我们现在在文档中有一个关于如何以编程方式执行此操作的主题:

How to: Export UML Diagrams to Image Files

如何:将 UML 图导出到图像文件

回答by Alan Wills

See also Cameron Skinner's blog post Save a diagram to Image File

另请参阅 Cameron Skinner 的博客文章将图表保存到图像文件

This describes how to create a context menu option in VS which will allow you to export the diagram as an image.

这描述了如何在 VS 中创建一个上下文菜单选项,它允许您将图表导出为图像。