如何在c#中打印dwg文件
我想在我的 c# 项目中以编程方式打印 dwg 文件,而无需打开 AutoCad。我的应用程序是基于网络的,并且我的文件位于共享文件夹中。我不知道该怎么做?
I want to print a dwg file programmatically in my c# project without opening AutoCad.my application is network base and my file is in a shared folder.I do not know how should i do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这有点棘手 -
您可以使用 Microsoft 的
print
命令,与System.Diagnostics.Process
结合使用:文件扩展名 DWG 属于 Autocad - 因此,当 Windows 尝试使用“打印”时文件,
它将使用 AutoCad 打印
试试这个:
并喊:
祝你好运!
this is abit tricky -
You can use Microsoft's
print
command, im combination withSystem.Diagnostics.Process
:The file extenstion DWG belongs to Autocad - hence when Windows will try to use 'print' with this file,
it will be printed using AutoCad
Try this one:
and call:
good luck!
您需要一个可以读取/渲染 DWG 文件的 .NET 组件,例如 CadLib 。开放设计联盟还有一个带有 .NET 包装器的 C++ 组件:http://opendesign.com/the_oda_platform/teigha_dot_net。
You would need a .NET component that can read/render DWG files, have a look at e.g. CadLib. the Open Design Alliance also have a C++ component with .NET wrappers: http://opendesign.com/the_oda_platform/teigha_dot_net.