cad

CAD关于全局字典读扩展记录操作(com接口网页版)

蓝咒 提交于 2019-12-09 15:10:35
上篇文章写的数据,能过如下方式读取, js代码: function readGlobalVar(sName) { // 得到CAD数据库 var database = mxOcx.GetDatabase(); // 得到全局字典 var dict = database.GetNamedObjectsDictionary(); // 得到用户自定义字典,MyExDataDictName是字典名称 var myDict = dict.GetAt("MyExDataDictName"); if (myDict == null) { // 没有数据。 return ""; } // 得到字典中的扩展记录数据。 var rec = myDict.GetAt(sName); if (rec == null) { // 没有数据。 return ""; } // 得到记录中的数据链表。 var ret = rec.GetXRecordData(); if (ret == null) return ""; // 返回写的数据。 return ret.AtString(0); } 调用代码 : var sRet = readGlobalVar("MyData"); if (sRet == "") { alert("没有数据") } else { alert(sRet); } 来源: https:/

CAD全局字典

我只是一个虾纸丫 提交于 2019-12-09 14:48:50
CAD图纸中有个全局字典,用来存放图纸中的全局信息,开发者可以通过在字典存放扩展记录方式存放自己的全局数据,字典已经内置了一些数据,比如:组,多线样式,布局信息,图片定义,Wipout等数据,比如下图: 全局字典类名:MxDrawDictionary,详细信息参考: http://www.mxdraw.com/help/IMxDrawDictionary.htm 得到DWG图的全局字典,js代码: // 得到数据库对象. var database = mxOcx.GetDatabase(); // 得到全局字典 var dict = database.GetNamedObjectsDictionary(); 来源: https://www.cnblogs.com/yzy0224/p/12010877.html

CAD关于标注样式修改标注对象的标注样式操作(com接口网页版)

可紊 提交于 2019-12-09 14:28:23
标注对象都一个DimensionStyle属性,用这个属性可以设置或取到标注对象的标注样式。 下面代码演示设置一个标注对象的样式 var ent = mxOcx.GetEntity("选择标注对象:"); if(ent == null) { return; } var dim = ent; // 得到数据库对象. var database = mxOcx.GetDatabase(); // 得到标注样式表. var dimStyleTable = database.GetDimStyleTable(); var sDimStyleName = "MyDimStyleName"; // 得到文本式 var dimStyle = dimStyleTable.GetAt(sDimStyleName, true); if (dimStyle == null) { // 如果没有就新建一个。 mxOcx.AddDimStyle("MyDimStyleName", "41,0.18,141,0.09,40,200", "77,1,271,3", "", ""); } else { // 如果被删除,就反删除。 dimStyle.SetProp("unErase", null); } // 设置实体文字样式。 dim.DimensionStyle = "MyDimStyleName";

A programming challenge with Mathematica

随声附和 提交于 2019-12-08 20:59:27
I am interfacing an external program with Mathematica. I am creating an input file for the external program. Its about converting geometry data from a Mathematica generated graphics into a predefined format. Here is an example Geometry. Figure 1 The geometry can be described in many ways in Mathematica. One laborious way is the following. dat={{1.,-1.,0.},{0.,-1.,0.5},{0.,-1.,-0.5},{1.,-0.3333,0.},{0.,-0.3333,0.5}, {0.,-0.3333,-0.5},{1.,0.3333,0.},{0.,0.3333,0.5},{0.,0.3333,-0.5},{1.,1.,0.}, {0.,1.,0.5},{0.,1.,-0.5},{10.,-1.,0.},{10.,-0.3333,0.},{10.,0.3333,0.},{10.,1.,0.}}; Show

PowerPoint (or Excel) VBA Capture Coordinates of Mouse Click

Deadly 提交于 2019-12-08 13:50:02
问题 Some Background: The quick background is that I am in the research stages of building an add-in for PowerPoint. My end goal is to develop a CAD Dimensioning Add-in to help expedite the creating of Engineering Presentations. We have to do a lot of "PowerPoint Engineering" where the general sizes of components are shown on simplified versions of said components created with PPT shapes or screenshots of the CAD geometry itself. But creating dimensions over and over is tedious. Each one generally

YCAD Library Usage

江枫思渺然 提交于 2019-12-08 07:19:27
问题 I started using the YCAD Library. The problem is that I cannot find any usage instructions and I am kind of confused because I have no idea how to use it. I am hoping that somebody here used it before or is using it now so he/she can give me some tips how to use the library. Thank you in advance. PS. One of the requirements for the project is to develop it in Java . I know that there are some good libraries in C#, C++, etc. but I need to do it in Java . Best regards, Dimitar Georgiev 回答1:

How do I get metadata from a 2d .dwg file using Forge AutoDesk APIs?

强颜欢笑 提交于 2019-12-08 07:05:08
问题 I was using the Forge AutoDesk Data management, design management and model viewer APIs to upload my .dmg, convert it to svf and then using the metadata. It works well for 3D designs but there seems to no guid inside the metadata when I use 2D designs. Is there something I am doing wrong? EDIT: I can get the manifest alright, but when I fetch the metadata for the same, it gives an empty array. { "type": "manifest", "hasThumbnail": "true", "status": "success", "progress": "complete", "region":

2D CAD application in WPF

醉酒当歌 提交于 2019-12-07 17:09:18
问题 I'm trying to write an CAD-like application in WPF(.NET 4.0) that needs to be able to display a lot of 2D points/lines. It will be used to display CAD-plans of entire cities with zoom, pan, rotate and point snapping on mouseover. Right now I purely use WPF. I read the objects from the CAD file draw them into a StreamGeometry, use it as stroke of a new Path and add it to a Canvas, with several transforms. My problem is that this solution doesn't scale well enough. It works fine with small CAD

PDF转CAD怎么弄?这两种方法你该试一下

拜拜、爱过 提交于 2019-12-06 20:55:09
对于PDF文件我们并不陌生,我们有时候需要将PDF文件转换成为CAD文件。那么PDF转CAD怎么弄呢?今天小编就来教大家两好用的转换方法,相信这两这两种方法一定能够帮助到大家的,那么就让我们一起来学习一下吧。 一、转换器转换 转换工具:PDF转换器 转换步骤: 1、打开这个 PDF转换器 ,在“CAD转换”界面中点击“PDF转CAD”功能。然后点击转换页面中的“点击或拖拽文件添加”添加PDF文件。 2、紧接着大家如果想要设置文件转换后的“输出目录”,可以在转换页面底部设置文件格式转换后的输出目录。 3、然后我们点击页面中的“开始转换”,同时在“状态”栏中查看转换进度。当转换进度显示为100%的时候,说明文件转换完成了。 二、工具转换 借助工具:转换器 转换步骤: 1、下载安装并打开这个转换器软件,在“CAD的其他转换”界面中,点击“PDF转CAD”功能。然后点击“点击选择文件”添加PDF文件。 2、紧接着我们可以在页面中设置文件转换的格式,同时可以选择PDF文件中需要转换的页码,然后点击“开始转换”就可以了。 3、文件转换完成之后,我们可以点击页面中的“继续添加文件”继续转换文件,可以点击“打开文件”或者是“文件夹”保存文件。 那么以上就是PDF转CAD的两种方法,希望我分享的方法可以帮助到大家。大家也可以学习一下 CAD转PDF ,毕竟技多不压身嘛。 来源: 51CTO 作者:

How do I get metadata from a 2d .dwg file using Forge AutoDesk APIs?

时间秒杀一切 提交于 2019-12-06 16:45:33
I was using the Forge AutoDesk Data management, design management and model viewer APIs to upload my .dmg, convert it to svf and then using the metadata. It works well for 3D designs but there seems to no guid inside the metadata when I use 2D designs. Is there something I am doing wrong? EDIT: I can get the manifest alright, but when I fetch the metadata for the same, it gives an empty array. { "type": "manifest", "hasThumbnail": "true", "status": "success", "progress": "complete", "region": "US", "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6ZGFkYXNkc2FkYS8xMTI2LmR3Zw", "version": "1.0",