
C#
sdphg
这个作者很懒,什么都没留下…
展开
-
C#启动一个外部程序(2)-ShellExecute
调用Win32 API。1.using System.Runtime.InteropServices;2.[DllImport("shell32.dll")] public static extern int ShellExecute(IntPtr hwnd,StringBuilder lpszOp,StringBuilder lpszFile,Stri转载 2006-12-07 11:09:00 · 1506 阅读 · 0 评论 -
Driving a basic AutoCAD plot using .NET
I just missed my connecting flight in Chicago, so have 3 hours to pass until the next, and decided to post some code I finally got around to writing on the plane from Zurich.Ive had a few requests转载 2007-10-15 14:00:00 · 1758 阅读 · 0 评论 -
Free webcast reminder: "AutoCAD: 10 easy ways to crash your AutoCAD addin"
As mentioned in this previous post, tomorrow were delivering a fun (and free!) AutoCAD development-oriented webcast entitled "AutoCAD: 10 easy ways to crash your AutoCAD addin". In case its not obvi转载 2007-10-15 14:03:00 · 899 阅读 · 0 评论 -
Allowing selection of an AutoCAD plot device and media name using .NET
A comment came in on this previous post regarding how best to know whether a media name is valid during your plot configuration.There are a few approaches, other than the one I chose of hardcoding t转载 2007-10-15 14:09:00 · 2113 阅读 · 0 评论 -
AU Unplugged session on AutoCAD development
Just a quick post today regarding an AU Unplugged! topic Ive submitted.The proposed session is called "Developing applications for AutoCAD: best practices for using AutoCADs APIs." Heres the de转载 2007-10-15 13:55:00 · 785 阅读 · 0 评论 -
Previewing and plotting multiple sheets in AutoCAD using .NET
This was a fun one to work on. The code in this post combines and extends upon techniques shown in two earlier posts: one showing how to plot multiple sheets and the other showing how to preview a s转载 2007-10-15 14:04:00 · 1445 阅读 · 0 评论 -
Accessing the active space or layout in an AutoCAD drawing using .NET
This question was asked as comment to a previous post by har!s:Thanks a lot for the code. I have yet to see 2008 and MultiLeader. But I presume that it works on both Model and paper spaces. In转载 2007-10-15 13:56:00 · 917 阅读 · 0 评论 -
Microsoft to release source for .NET Framework Libraries
I thought Id bring your attention to this post on Scott Guthries blog - this is a really exciting announcement for .NET developers everywhere:Releasing the Source Code for the .NET Framework Libra转载 2007-10-15 14:08:00 · 955 阅读 · 0 评论 -
Plotting a window from AutoCAD using .NET
This post extends this previous post that dealt with driving a single-sheet AutoCAD plot by adding some code to handle selection and transformation of a window to plot.First order of business was to转载 2007-10-15 14:10:00 · 2519 阅读 · 0 评论 -
Creating a multileader in AutoCAD using a jig from .NET
Im now back from a fantastic break in Italy and am trying hard to catch back up. Next week Im off again to San Diego (work, this time), which may cause further interruptions in blog postings.Thi转载 2007-10-15 13:58:00 · 2438 阅读 · 0 评论 -
Previewing and plotting a single sheet in AutoCAD using .NET
This weeks posts take the code I threw together last week for single-sheet and multi-sheet plotting, and introduces the concept of "plot preview".Im learning as I go for much of this, so there ar转载 2007-10-15 14:02:00 · 1127 阅读 · 0 评论 -
Driving a multi-sheet AutoCAD plot using .NET
Somewhat symmetrically I’m posting this from Chicago airport, once again, but thankfully I’m now on my way home. It was a busy week of meetings, but I did get the chance to put together some code that转载 2007-10-15 14:01:00 · 1834 阅读 · 0 评论 -
获取当前文件的路径
获取当前程序文件的路径也算是一个比较常见的需求,比如我有一个文件conn.xml位于.exe的同一目录,在运行时需要从中读取一些设置信息。 进程对象在.NET中表现为System.Diagnostics.Process类,通过调用Process.GetCurrentProcess().MainModule.FileName可获得当前执行的exe的文件名。但是这个方法得到的仅仅是文件名转载 2006-12-07 18:33:00 · 1481 阅读 · 0 评论 -
.NET 创建可以供VB调用的COM
到了.NET后,VS.NET就很难生成一个像VB或者VC里那样的COM了 ,一直没有找到好的解决方法,最近在网上看到了一篇文章说可以用.NET2.0创建可以供VB调用的COM,拿来放着,有空研究一下。 1.定义接口 Com是通过抛出接口让外部应用调用的,每个接口、组件都有一个Guid,转载 2006-12-08 13:21:00 · 1163 阅读 · 0 评论 -
arx .net api 的初始化与清除
NET API的初始化与清除 在ObjectARX中,"acrxEntryPoint"函数是ARX程序的载入点,程序的初始化和清除均可在该函数中进行。而在.NET API中则首先需要将初始化代码封装在一个类中,同时该类需要压迫实现 IExtensionApplication接口。该接口包含Initialize与Terminate两个函数。其中Initialize负责加载程序时的初始化操原创 2007-01-23 14:54:00 · 1072 阅读 · 0 评论 -
c#大文件读取和写入数据库(带进度条的源代码)
最近一个项目需要将大文件写入和读取到数据库,觉得可能很多人也需要相关得东西,所以就将代码帖出来protected int state = 0; //表示进度条当前处理的事件类型,1表读取word,2表写入word,3表doc转pdf,4表txt转pdfprivate System.Windows.Forms.Form getDialog(string strFormName,Syst转载 2007-03-22 10:52:00 · 2359 阅读 · 0 评论 -
Accessing DWG files not open in the AutoCAD editor using .NET
This topic was briefly introduced almost a year ago, in this post. I then looked into the code a little further in a follow-up post. But at the time this topic wasnt the main thrust of the post, i转载 2007-07-20 16:45:00 · 1585 阅读 · 0 评论 -
Accessing the AutoCAD objects referred to by fields using .NET
Thanks to Wolfgang Ruthensteiner for suggesting this excellent topic a comment to this previous post. Heres Wonfgangs question:How do I read back the field code with C# (from an attribute e转载 2007-07-20 16:20:00 · 3319 阅读 · 0 评论 -
Using a palette from .NET to display properties of multiple AutoCAD objects
After a brief interlude were back on the series of posts showing how to implement basic user-interfaces inside AutoCAD using .NET. Heres the series so far: Using a modal .NET dialog to d转载 2007-07-20 16:22:00 · 2000 阅读 · 0 评论 -
Free webcast: "AutoCAD: .NET for LISP Programmers"
On October 18th were delivering a free AutoCAD development-oriented webcast entitled "AutoCAD: .NET for LISP Programmers".Check here for our overall API schedule, or go here to register directly. T转载 2007-10-15 14:11:00 · 945 阅读 · 0 评论