autocad

Opening any version of Autocad from windows form application

怎甘沉沦 提交于 2019-12-02 22:47:35
问题 I am currently creating a windows form application that needs to open autocad .I have done it for Autocad 2014.Is there any way we can do this task workable not just for single version but for any version.In addition to this I have created dll for 2014 which worked fine.By altering the references acmgd.dll and acdbmgd.dll i got it worked on 2007 too.Is there any way except this to create a dll orking in all version.Thanks in advance. 回答1: One way to potentially achieve this is to find out

web html页面显示autocad等dwg格式图形文件方法

匿名 (未验证) 提交于 2019-12-02 20:37:03
2中思路, 一种是转换后显示 ,比如vectordraw,将dwg转换成vds格式,再在web中显示,支持图层啊之类。还有CADViewer JS是转成SVG,pdf等格式,然后用web浏览……其实转换格式也是一个办法,用golang在后端,当有请求的时候,调用转换程序AutoXChange进行dwg到pdf的转换。如下列代码,缺点有3个,一个是万一后端转换不成功,等待很久,还要退出这个进程,另一个缺点是,autoxchange虽然支持字体路径,但是似乎不起作用,还是无法显示中文,最后一个当然是需要购买啦,否则有水印。 package main import ( "fmt" "os/exec" "time" ) func main() { iname := "Office.dwg" oname := "office.svg" // fontpath := "\\Fonts" "-FP", fontpath, arg := []string{"-i", iname, "-o", oname, "-DF", "arial", "-f", "svg", "-text", "-v=5"} //ax2017 -i office.dwg -o office.pdf -f pdf -text -v=5 cmd := exec.Command("ax2019.exe", arg...) /

AutoCAD二次开发(2020版)--3,执行ARX文件--

我的未来我决定 提交于 2019-12-02 14:36:28
上一节中我们在initApp()函数中,将helloWorld()函数注册给了CAD主程序,注册指令的字符串为“Hello”。 void initApp() { acedRegCmds->addCommand(_T("HELLOWORLD_COMMANDS"), _T("Hello"),_T("Bonjour"), ACRX_CMD_TRANSPARENT,helloWorld); } 如果你用过CAD的话会知道在CAD中经常用类似命令行的方法输入指令,我们上一个程序就给CAD新增了一个指令“Hello”。 用这个新增指令就可以调用被注册的函数helloWorld(); 注意,CAD指令不分区大小写。 执行之前,首先要加载ARX文件。 方法1:   最直接的方法是,打开一个CAD窗口,然后将ARX文件直接拖到画布中, 会弹出提示,选择始终加载或者加载一次都可以,确定后完成加载。 (示例图上的文件名和本教程中上一节程序的文件名不同,请忽略。) 方法2:   在CAD窗口中输入指令 APPLOAD,然后在弹出窗口中,找到你的ARX文件,点击加载。 加载成功之后,直接输入命令hello 就会调用helloWorld()函数 在屏幕上打印 Hello World ! 手动创建项目是为了理解框架的基本结构,下一节开始,将一直使用模板创建项目,能极大提高效率。 来源: https://www

Retrieve output parameters from an AutoCAD API method in python

只愿长相守 提交于 2019-12-02 13:33:12
I'm trying to retrieve 2 output Arrays from an XRecord in AutoCAD 2016 using python 2.7, with comtypes imported, the first array is an array of integers (DXF Group Codes) and the second array is an array of variants (the values of XRecord). The opposite way of what this question seeks to The method of interest is GetXRecordData , which (according to AutoCAD's documentation) if successful returns None , and only accepts 2 output arguments . when I try to retrieve it with code like DxfGrCd = [] vals = [] an_XRecord.GetXRecordData(DxfGrCd, vals) and see the values of DxfGrCd and vals I found no

AutoCad Command Rejected “Undo” when using Application.Invoke()

随声附和 提交于 2019-12-02 09:23:01
I am using Application.Invoke() to invoke AutoLisp commands in AutoCad synchronously. Most of my commands work fine, but there are several that come up with the error Error: AutoCAD command rejected: "_.UNDO" The commands in particular are AutoCad Electrical commands such as c:ace_insertwire and c:wd_insym2. Here's my code: Using rb As New ResultBuffer() rb.Add(New TypedValue(LispDataType.Text, "c:wd_insym2")) rb.Add(New TypedValue(LispDataType.Text, name)) rb.Add(New TypedValue(LispDataType.ListBegin)) rb.Add(New TypedValue(LispDataType.Double, coords(0))) rb.Add(New TypedValue(LispDataType

Interfacing AutoCAD with JAVA

吃可爱长大的小学妹 提交于 2019-12-01 06:38:31
Any idea on interfacing with AutoCAD through a JAVA program. I am looking for a solution that can directly interface with an AutoCAD session (even start one), the way it works with the .NET extensions of AutoCAD. Or any way to work with ObjectARX through JAVA, definitely not writing a complete JNI wrapper over it. Added: We are looking for something in open-source. In case there is none, we are ready to create one in open-source if someone can lend a helping hand explaining how it can be done. We have taken a look at JNA and JaWin. JNA clubbed with JNI might help but is too ugly. JaWin on the

Is it possible to edit block attributes in AutoCAD using Autodesk.AutoCAD.Interop?

ぃ、小莉子 提交于 2019-12-01 00:02:29
I have developed an external WPF application to generate drawings in c#. I have been able to draw, dimension, add blocks and every thing else required by the application using Autodesk.AutoCAD.Interop, however I can't seem to populate The title block, or generate a parts list. All the examples I've seen are based on the mechanism that requires the application to run as a plugin inside AutoCAD. The truth is, inserting a line used is one or two lines of code using ModelSpace.InsertLine, now, it's at least 8 lines of code! Is there a way to achieve this functionality using the Autodesk.AutoCAD

Civil 3D AutoCAD Tips & Shortcuts-Jeff

孤人 提交于 2019-11-30 21:59:52
在CAD对话框,输入数字的地方, 可以输入“=1/12”,然后按住"Alt+enter"软件会计算出数值 cad中,直接按住文本,可以拖动其位置 mleader会出带箭头的文本,两个可以一起移动 selectionannodisplay (0,1)控制annotative的文本选中是否出不同的大小 listavailablepointnumbers, listusedpointnumbers reportsurfacevolume undo--mark--{working}---undo--back {to type in distance}'cal--(expression) 12/2 'cal--dee{midpoint between two points} 'cal--rad+dee-- 'cal--(end+end+end)/3-- 'cal--pld(end,end,5) #5unit away from the first point{pld:point line distance} 'cal--plt(end,end,0.25) #25% away from the first point{pld:point line percentage} fillet--rad-- whohas 选中曲面--extract from surface--select from

Diagnosing self-healing MSI

不羁的心 提交于 2019-11-30 19:36:01
问题 The app I work on is written mainly in VB6. Some users report that when they start up my app a different MSI installer will automatically run and try to repair its own installation. Often this is for AutoCAD but sometimes other programs also. Usually this occurs every time they start the app. What is a procedure that we can use to diagnose why this occurs? Since it is a third-party's installer which is running we don't have any visibility into what it is doing. AutoDesk does have some info

Is it possible to edit block attributes in AutoCAD using Autodesk.AutoCAD.Interop?

99封情书 提交于 2019-11-30 18:31:47
问题 I have developed an external WPF application to generate drawings in c#. I have been able to draw, dimension, add blocks and every thing else required by the application using Autodesk.AutoCAD.Interop, however I can't seem to populate The title block, or generate a parts list. All the examples I've seen are based on the mechanism that requires the application to run as a plugin inside AutoCAD. The truth is, inserting a line used is one or two lines of code using ModelSpace.InsertLine, now, it