autocad

.NET AutoCAD二次开发之路(一、基础篇)

烈酒焚心 提交于 2020-01-23 07:43:15
学习AutoCAD二次开发已经有一段时间了,磕磕碰碰,十分的艰辛枯燥。但回想一下还是会有些小激动,嘿嘿!最近这段时间一直都有这么个想法,就是将我学习CAD二次开发的过程用文字的方式记录下来,形成系列,并定期更新。主要内容就是记录自己每天学习过程中所碰见的问题和感悟,并总结今天所学到的内容。目的一是激励自己坚持下去,看着自己一步一步的提高,多有成就感。还有就是和大家积极沟通,希望能够指正我的错误,减少我的弯路。再者就是望能给后面学习的人一点点借鉴经验,好吧其实还有点装B的心里。废话不多说就进入今天的正题: ⦁ 使用工具:Visual Studio 2013和AutoCAD2010 ⦁ 学习工具:《AutoCAD VBA和VB.NET开发基础和实例教程》C#版、《深入浅出AutoCAD.NET二次开发》、《AutoCAD .net开发人员手册》和网络(目前) ⦁ 操作系统:Win10 64位 ⦁ 开发语言:C# ⦁ 软件设置: 1.打开Visual Studio 2013,新建一个【类库】项目; 2.在软件右侧【解决方案资源管理器】(如果没有,在【视图】中选择第一个选项即可)的项目内找到“引用”,右击选择【添加引用】,然后选择【浏览】选项卡,接着找到CAD安装目录下的acdbmgd.dll和acmgd.dll这两个文件,【确定】; 3.在“引用”中找到刚引用的两个文件acdbmgd

CAD和AD之间究竟有啥关系?

允我心安 提交于 2020-01-23 04:23:44
总结一下自己最近的工作。 从CAD到AD。 CAD我们公司结构工程师使用的软件,而AD(Altium Designer )是做电路的使用的软件,有朋友不明白这两个有啥关系呢?且听我慢慢道来。 AutoCad是一款比较流行的绘图工具,大家都知道。 我公司的结构工程师使用该软件绘制公司产品具体结构,当然也包括印制电路板的外形。结构工程师通过CAd和ProE软件对所要研制的产品进行三维建模。通过建模并对PCB印制板的外形,排放器件的位置进行规定。 我(一位资深的PCB工程师)就拿到结构确定好的PCB外形图开始排布电子元器件。 以上就是AutoCAD(以下简称CAD)和AltiumDesigner(以上简称AD)的关系。 接下来,将这两者之间究竟是怎样联系的呢? 大家都知道,在AutoCad中可以将DWG文件可以保存为DXF文件,而这个DXF文件就显得比较重要呢。 DXF文件保存步骤: 在AutoCAD中打开要保存的DWG文件,用鼠标点击:文件——>另存为——>选择DXF文件并保存。 通过CAD软件,结构工程师印制板外形图确定好,然后我就打开AD 软件,通过新建工程Pro,在该工程添加正确的电路原理图,以及空白的PCB文件,PCB封装库并保存。 并将PCB文件打开,用鼠标点击:文件——>import——>DXF 找到上一步保存DXF文件的位置后,打开该文件,选择模型带入,元素导入

Developing plugins for AutoCAD? [closed]

旧城冷巷雨未停 提交于 2020-01-22 05:23:08
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I'm thinking about starting to develop a plugin for AutoCAD, but I have absolutely no knowledge of the field. How does the plugin system work? What are the licensing terms? What programming platforms are available? I'd really appreciate if somebody could give me a primer, or, even

How to convert WMF to EMF+ with GdipConvertToEmfPlus without losing three-quarter of image?

点点圈 提交于 2020-01-17 02:27:11
问题 After converting WMF to EMF+ in order to get anti-aliased rendering, only the upper left quadrant of my WMF is included after conversion to EMF+. Drawing the WMF (before conversion) with EnumerateMetafile works, but doesn't anti-alias, which is what I'm gunning for here. Any ideas why three quarters of the image is lost on conversion? The WMF was generated by AutoCAD LT and 32640x14586 pixels sized, with units/inch=1632. The record types in the EMF (after conversion) are: EmfMin Header

How to update xdata information of an entity when it is copied

一笑奈何 提交于 2020-01-16 10:43:58
问题 I have two texts associated to a line. Because the texts represent some data of the line they are always considered children of the line and visible next to it. Through some lisp routines, if the data of the line change, the text entities reflect the change by changing their text. For that I have stored the handle of the line to each text as xdata and vice versa, e.g. the handles of the texts into the line. The problem arises when I copy the line with the texts where each one gets a new

How to update xdata information of an entity when it is copied

你说的曾经没有我的故事 提交于 2020-01-16 10:43:48
问题 I have two texts associated to a line. Because the texts represent some data of the line they are always considered children of the line and visible next to it. Through some lisp routines, if the data of the line change, the text entities reflect the change by changing their text. For that I have stored the handle of the line to each text as xdata and vice versa, e.g. the handles of the texts into the line. The problem arises when I copy the line with the texts where each one gets a new

How to update xdata information of an entity when it is copied

北城余情 提交于 2020-01-16 10:43:33
问题 I have two texts associated to a line. Because the texts represent some data of the line they are always considered children of the line and visible next to it. Through some lisp routines, if the data of the line change, the text entities reflect the change by changing their text. For that I have stored the handle of the line to each text as xdata and vice versa, e.g. the handles of the texts into the line. The problem arises when I copy the line with the texts where each one gets a new

Targetting x64 platform with entity framework 4.1 in Visual Studio 2010

血红的双手。 提交于 2020-01-15 03:18:07
问题 I have a database application that references Entity Framework 4.1. In the properties window of the project both the Configuration as well as Platform selection options are disabled. I wan't to target this application only for x64 systems. Also there are some other projects in the same Solution and they have only x86 option avaliable as platform. I don't get the idea why I couldn't target x64 systems specifically. I have windows 7 64 bit running on my pc. Any clues how to target specifically

Using Python to Automate AutoCAD

只谈情不闲聊 提交于 2020-01-14 03:31:06
问题 I'm very new to Python and AutoCAD so please bear with me. I'm trying to use Python to automate a design cycle in AutoCAD. So far I am able to add points and lines in AutoCAD via Python but I want to be able to change the linetype to a dotted line. I understand that this can be done in the command bar in AutoCAD with a few simple commands but I can't work out how to do it through Python. import array from _ast import If import comtypes.client import pyautocad #Get running instance of the

Caliburn micro in no Application object mode, like in AutoCAD dll plugin

假装没事ソ 提交于 2020-01-13 15:50:30
问题 I am using Caliburn Micro to develop WPF application. A few of views of this application needs to be loaded in an AutoCAD environment. The AutoCAD programming environment allows developement of AutoCAD plugins (of type dll) and load them into the AutoCAD environment. Because of AutoCAD plugin type(dll), the plugin does not have an Application Object, so the bootstrapper has to be customized for that. According to the Caliburn Micro documentation here (Scroll down to "Using Caliburn.Micro in