导出 Enterprise Architect 图表的自动化方法?
问题:我们的许多设计和架构文档都是在 Enterprise Architect 中创建和维护的 - 无论好坏,就是这样。这些文档存储在我们的 subversion 存储库中 - 这对于创建和更新它们的人员来说非常有效 - 因为我们拥有 EA 的许可证 - 但许多开发人员(内部和外部)在我们的代码库上工作并且需要制作使用图表,但并非全部都有 EA 许可证。
糟糕的解决方案:我们可以手动将 EA 文档导出为可移植格式,然后将其签入,但有时可移植格式版本与 EA 文档已经过时,因为它依赖于人工来执行这些步骤手动转换。
更好的解决方案:我们一直在寻找一种自动化转换的方法。这可以作为提交后挂钩或作为我们持续集成系统的一部分运行。我们缺少的部分是允许我们自动化转换的部分。有什么想法吗?
Problem: A lot of our design and architecture documentation were created and maintained in Enterprise Architect - for better or worse, that is how it is. These documents are stored in our subversion repository - which works out pretty well for the folks that create and update them - since we have licenses for EA - but many of the developers (both internal and external) who work on our codebase and need to make use of the diagrams but dont all have EA licenses.
Poor Solution: We could manually export the EA documents to a portable format and then check those in, but there are bound to be times when the portable format version is out of date with the EA document since it relies on the human to take the steps to manually convert.
Better Solution: We have been looking for a method to automate the conversion. This could be run as a post-commit hook or as part of our continuous integration system. The part we are missing is the piece that allows us to automate the conversion. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在示例代码中,我刚刚发现了一个函数 Wish 可以完全满足您的需求。但隐藏在不太有用的名称 ProjectInterfaceExample 中:
您可能需要稍微微调一下(即不要将所有内容写入 C:\Temp),但这是一个好的开始。
In the Example code I just discovered a function whish will do exactly what you want. But hidden away by the not so helpfull name of ProjectInterfaceExample:
You might have to fine tune it a litte (i.E. not writing everything into C:\Temp) but it is a good start.
我不熟悉该产品,但您链接到的网站提到了自动化界面。这应该允许您通过脚本语言(例如 VBScript 或 JavaScript)控制 Enterprise Architect。可以通过该接口进行打印;如果是这样,您可以安装 PDF 打印机驱动程序(或打印到使用通用 PostScript 打印机驱动程序创建一个文件,并使用 GhostScript 将其转换为 PDF。
I am not familiar with this product but the Web site you link to mentions an Automation interface. This should allow you to control Enterprise Architect from a scripting language such as VBScript or JavaScript. It may be possible to print via this interface; if so, you could install a PDF printer driver (or print to a file using a generic PostScript printer driver and use GhostScript to convert it to PDF.
我们有 Enterprise Architect,并且我们将它与 Word 完美集成。我们编写了自己的 Wicket/Jetty WebApp,它将 EA 图的链接作为 HTTP URL 发布,然后我们将其“插入并链接”到我们的 UCR(或其他任何内容)文档中。 Web 应用程序显示一个树状链接结构,每个包对应一个链接,然后我们只需将链接复制到 Word 文档中即可。
效果非常好。我们可以在 EA 中进行任意多的更改,然后在 Word 文档中只需按 CTRL+A 选择全部并按 F9 更新所有链接。不幸的是我没有编写代码,所以我无法确切地告诉你它是如何从 EA 发布的。我认为有一些 Java 代码只是轮询 EA 服务器并在检测到更改时吸出所有内容。
We have Enterprise Architect and we have it nicely integrated with Word. We wrote our own Wicket/Jetty WebApp that publishes links to EA diragrams as an HTTP URL that we then "Insert&Link" into our UCR (or anything else) documents. The web app displays a tree like structure of links, one for each package and then we just copy the link into the word document.
It works really well. We can make as many changes as we like in EA and then in the Word document just go CTRL+A to select all and hit F9 to update all links. Unfortunately I didn't write the code so I can't tell you exactly how it's published from EA. I think there's some Java code that just polls the EA server and sucks out everything if it detects changes.
VBScript 确实是一种简单快捷的方法。我想出了一个可以导出图表的小脚本。您唯一需要知道的是它的 GUID。
VBScript is really an easy and quick possibility. I figured out a small script that allows to export a diagram. The only think you have to know is it's GUID.