问题标签 [dwg]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
4574 浏览

vb.net - 如何在 vb.net 中打开 AutoCAD 图纸并运行脚本?

我正在尝试使用 AutoCad 打开文件夹中的所有 .dwg 文件并运行以前编写的脚本。为此,我构建了以下代码:

谁能帮我理解为什么它不起作用?

首先,我收到“RPC_E_CALL_REJECTED”错误。但是我插入了一个句柄来读取 isQuiescent 状态,现在我只是在 AutoCad 空闲但静止时运行 .Open,Visual Studio 正在返回一个没有任何数字的错误。

COM 详细信息例外是:-2147418113

有人知道在 AutoCad 中简单地打开现有文件并运行脚本的正确方法吗?我不知道,我只是按照他们网页上的 AutoDest 说明进行操作,我认为这很容易:(

0 投票
1 回答
667 浏览

vb.net - Feasibility of automation in AutoCAD through VB.NET

My final year B.Tech. project is to (application development in VB.NET) automate the design & analysis of Intze Tank. The complete design with all the details (blueprints) need to be generated into a DWG file (AutoCAD).
I need to know how feasible it is for me (alone) to come close to completing such a project.
What all libraries & learning resources I can benefit from?
Where can I find similar such project(s)? (even names/links would be enough)
Contacts of any knowledgeable person other than Autodesk personnel would also be very helpful.

Thanks!

0 投票
5 回答
3355 浏览

php - readfile() 在尝试强制下载时返回空文件

我正在尝试.dwg使用以下代码强制下载文件:

该文件的路径是正确的,但它只返回一个6 字节且无法打开的文件。它应该是754 字节。任何人都可以在这里帮助我吗?

0 投票
1 回答
813 浏览

c# - OpenDesign Specification for .dwg files

I've been working with OpenDesign Specification for .dwg files about two weeks. And now, i've got all information except non-entity object and entity object. Maybe i can't understand how this information written. Concretely i need to know how to differ non-entity object and entity object. Work on C#. http://opendesign.com/files/guestdownloads/OpenDesign_Specification_for_.dwg_files.pdf on the page 98.

This is how i found out non-entity object format:

0 投票
0 回答
521 浏览

c# - 在浏览器上查看和编辑 DWG 文件

我需要执行以下操作

  1. 用户将登录到我的应用程序并上传 AutoCAD 文件
  2. 用户将在以后打开文件以在浏览器中查看和编辑
  3. 用户将需要能够为文档添加红线。这包括在文档顶部绘制线条和基本形状的能力。
  4. 用户将以 .dwg 格式保存修改后的 AutoCAD 文件

我正在寻找第三方开发工具包或 API 帽子将允许我1.
在浏览器中显示 AutoCAD 文件
2.允许用户在其上绘图

注意:我不能在我的客户端机器上安装任何东西,但是浏览器插件是可以接受的。
任何帮助将不胜感激。

0 投票
1 回答
1409 浏览

c# - 通过 WebClient Silverlight 下载任何文件

我尝试通过 WebClient 下载 .dwg 文件,如下所示:

目录“文件”包含 2 个文件:files/1.txt files/2.dwg 我可以下载 1.txt,但是当我下载 2.dwg 时,webclient 会抛出新的异常“NotFound”。如何在 Silverlight 中通过 webclient 下载任何文件,或者是否有其他人可以下载文件?我使用以下行来访问文件:mySite:13866/testWebTestPage.aspx?url=files/1.dwg

0 投票
2 回答
11319 浏览

c++ - How to handle DWG files in C++

I'm working on a project where I will need to import line data from a .dwg file in C++ and am struggling to know where to start. I've had a look at this http://opendesign.com/files/guestdownloads/OpenDesign_Specification_for_.dwg_files.pdf, and I think it is possibly too hardcore for me unless anyone knows of a way of describing, simply, in code the strategy for decoding it? For instance, presumably every single operation would have to be bit wise?

Other than that, I might have to rely on some third-party libraries, but the question is: Are there any such (open source) libraries which are licensed with a permissive license? I can't use copy left code in this project.

To clarify in response to comments, I'm looking for permissive licensed libraries (see http://en.m.wikipedia.org/wiki/Permissive_free_software_licence). This includes for example MIT and BSD licenses, but not GPL (LGPL would work perhaps, but only if there are exceptions for static linking). And of course public domain would work too. GPL is strongly copyleft, meaning even if you don't alter it, but link to it with separate original code that code has to also be licensed under GPL.

0 投票
1 回答
498 浏览

c++ - 在 C++ 中链接到 libredwg 不起作用

我正在尝试使用 libreDWG 打开和理解一些 dwg 文件。我已经安装了它,并且至少可以运行一些测试程序(即使它们稍后会出现故障)。无论如何,我在我的项目中包含了一个小头文件,与此处找到的简单示例非常相似https://github.com/h4ck3rm1k3/libredwg/blob/master/examples/load_dwg.c数据似乎存在一般问题类型(至少在我编译它的方式上)意味着我已经添加了一些表单类型 (char*) 到以前试图自动转换 (void*) 和 (unsigned char*) 到类型 ( char*) 并摆脱了那些编译器的抱怨。但即使当我像这样编译它时

我收到以下错误:

我不知道该怎么做,我已经修复了编译器抱怨的源代码中的任何问题,并且正在使用 -lredwg 链接到相关库(对吗?我没有错过任何问题?)。我的头文件只是为了测试功能,看起来像:

我究竟做错了什么?我相信 libredwg 是用 c 编写的。这是问题吗?

0 投票
1 回答
1216 浏览

r - rgdal 包中的 readOGR 是否支持 DWG 文件?

我想将 .DWG 文件读入 R。DWG 在 GDAL 中支持的 OGR 格式列表中:

http://www.gdal.org/ogr/ogr_formats.html

所以理论上,我应该能够在 rgdal 中使用 readOGR() 读取 .DWG 文件。但我不知道如何定义dsn。

ogrDrivers() 命令为我提供了可用驱动程序的列表,但该列表与 GDAL 网站上的可用 OGR 格式列表不匹配。

根据 DWG 文件的 OGR 页面,应该有一个 DWG 驱动程序,但它甚至不在 rgdal 中的 OGR 驱动程序列表中。

这是否意味着 rgdal 不支持 DWG 文件,即使 GDAL 中的 OGR 支持它们?

非常感谢。

0 投票
1 回答
391 浏览

c# - 缩放 DWG 文件的特定点

我是 Autocad 的新手。我有一张dwg图纸,其中包含与某个区域的计划相关的信息。我正在开发一个小型 Windows 应用程序,用户可以在其中输入所需的城市,应用程序将以缩放给定城市的方式打开dwg文件。Autocad.exe我想知道是否可以dwg使用 C# 打开缩放用户提供的计划城市区域的绘图。如果是这样,请使用示例代码段进行指导。