中文字幕理论片,69视频免费在线观看,亚洲成人app,国产1级毛片,刘涛最大尺度戏视频,欧美亚洲美女视频,2021韩国美女仙女屋vip视频

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
補譯:Microsoft VisualStudio概述 - 版本選擇及其他
userphoto

2012.09.09

關注

補譯:Microsoft VisualStudio概述 - 版本選擇及其他

分類: AutoCAD .NET API開發(fā) 601人閱讀 評論(1) 收藏 舉報
 

Overview of Microsoft Visual Studio

Microsoft Visual Studio概述

Microsoft Visual Studio is an object-oriented programming environment that runs independently of AutoCAD. While Microsoft Visual Studio is external to AutoCAD and other applications, it is able to interact with applications that expose either a native .NET API or ActiveX/COM library.

Microsoft Visual Studio是不依賴AutoCAD運行的面向對象編程環(huán)境。雖然Microsoft Visual Studio是AutoCAD及其他應用程序的外部環(huán)境,但它能與那些公開了自己的本地.NET API或ActiveX/COM庫的應用程序進行交互。

Topics in this section本節(jié)主題

·         Which Edition of Microsoft Visual Studio to Use 使用Visual Studio哪個版本

·         Use COM Interoperability with .NET 使用COM與.NET交互操作

·         Dependencies and Restrictions 依賴性及限制

 

1、Which Edition of Microsoft Visual Studio to Use使用Visual Studio哪個版本

Microsoft Visual Studio is available in multiple versions and editions. To use the .NET API for AutoCAD 2012, you need to use:

Microsoft Visual Studio有多個版本可用。要是開發(fā)AutoCAD 2012 .NET API項目,我們需要使用:

·         Microsoft Visual Studio 2010

·         Microsoft .NET Framework 4.0

Note Projects compiled with Microsoft Visual Studio 2008 with a target of Microsoft .NET Framework 3.5 should load into AutoCAD 2012 without a problem. Microsoft Visual Studio 2008 cannot be used to debug projects loaded in AutoCAD 2012; you must use Microsoft Visual Studio 2010 when debugging a project.

注意:由Microsoft Visual Studio 2008編譯的目標為Microsoft .NET Framework 3.5的項目可以加載到AutoCAD2012運行沒有問題。但Microsoft Visual Studio 2008不能用來調試AutoCAD 2012加載的項目,調試項目時必須使用Microsoft Visual Studio 2010。

If you are using AutoCAD 2010 or AutoCAD 2011, you should use:

如果使用的是AutoCAD 2010或AutoCAD 2011,則應選擇:

·         Microsoft Visual Studio 2008 with Service Pack 1

·         Microsoft .NET Framework 3.5 with Service Pack 1

If you are using AutoCAD 2007 through AutoCAD 2009, you should use:

如果使用的是AutoCAD 2007到AutoCAD 2009,則應選擇:

·         Microsoft Visual Studio 2005

·         Microsoft .NET Framework 2.0 or later (或2.0以上)

Microsoft Visual Studio is offered in two editions: for free and for pay. The free edition is known as Microsoft Visual Studio 2010 Express Edition, while the for pay editions vary by name and price due to the different development tools that are incorporated into them. Microsoft Visual Studio 2010 Professional Edition provides improved debugging over Microsoft Visual Studio 2010 Express Edition along with a number of other features. The most common edition of Microsoft Visual Studio used by developers is Microsoft Visual Studio 2010 Professional Edition.

Microsoft Visual Studio有兩種版本供選擇:免費版本和付費版本。免費版本眾所周知就是Microsoft Visual Studio 2010 Express版,付費版本的名稱和價格因整合的開發(fā)工具的不同而異。Microsoft Visual Studio 2010專業(yè)版提供了比Microsoft Visual Studio 2010 Express版改進了的調試性能及其他許多特性。開發(fā)人員最常用的Microsoft Visual Studio版本就是Microsoft Visual Studio 2010專業(yè)版。

Note While it is possible to use Microsoft Visual Studio Express with the AutoCAD .NET API, this guide assumes you are using one of the other versions such as Microsoft Visual Studio 2010 Professional Edition or Microsoft Visual Studio 2010 Premium Edition.

注意:可能有人使用Microsoft Visual Studio Express版進行AutoCAD .NET API開發(fā),但本指南假設你使用的是Microsoft Visual Studio 2010專業(yè)版或Microsoft Visual Studio 2010高級版。

There are four main advantages to using Microsoft Visual Studio:

使用Microsoft Visual Studio的四大優(yōu)勢:

·         Robust and accessible development environment that has a modest learning curve. 強大易用的開發(fā)環(huán)境,輕松的學習過程;

·         VBA and VB.NET syntax are similar, which makes it an ideal environment for existing VBA users. VBA和VB.NET語法相近,是現有VBA開發(fā)人員理想的環(huán)境;

·         Visually intuitive and extensive dialog box creation tools. 直觀、豐富的對話框創(chuàng)建工具;

·         Projects can be built as a standalone executable or DLL assembly which can then be loaded into AutoCAD for execution. 可以將項目生成為獨立的可執(zhí)行程序或DLL程序集,加載到AutoCAD執(zhí)行;

Note Unlike VBA projects, .NET applications do not suffer from performance degradation when loaded and run in 64-bit AutoCAD.

注意:不像VBA項目,.NET應用程序加載并運行在64位AutoCAD環(huán)境時性能不會下降。

For more information on the different editions of Microsoft Visual Studio, see http://www.microsoft.com/vstudio and http://www.microsoft.com/express.

更多關于Microsoft Visual Studio不同版本的信息,見http://www.microsoft.com/vstudiohttp://www.microsoft.com/expressPlease send us your comments about this page

2、Use COM Interoperability with .NET使用COM與.NET互操作

Microsoft Visual Studio can utilize both native .NET and COM interfaces in the same project. By utilizing COM interop, you can migrate existing code that might have been written in Visual Basic 6 or VBA without having to completely rewrite it. To access AutoCAD automation objects from a project created in Microsoft Visual Studio, create references to the following files:

Microsoft Visual Studio可以在同一個項目中使用本地.NET和COM兩種接口,這樣我們就可以移植現有的那些用VB6或VBA寫的代碼而不必完全重寫。要想在Microsoft Visual Studio創(chuàng)建的項目中訪問AutoCAD自動化對象,需要建立對下列文件的引用:

·         The AutoCAD 2012 type library, acax18enu.tlb, located at <drive>:\Program Files\Common Files\Autodesk Shared. AutoCAD 2012類庫文件acax18enu.tlb,位于C:\ Program Files\Common Files\Autodesk Shared;

·         The AutoCAD/ObjectDBX Common 18.0 type library, axdb18enu.tlb, located at <drive>:\Program Files\Common Files\Autodesk Shared. AutoCAD/ObjectDBX18.0通用類庫文件axdb18enu.tlb,位于C:\ Program Files\Common Files\Autodesk Shared;

Note The previous mentioned type libraries are also available as part of the ObjectARX SDK. For information on downloading and installing the ObjectARX SDK, see Components of the AutoCAD .NET API.

注意:前面提到的類庫文件還可以從ObjectARX SDK中得到。……

These references will make the following primary interop assemblies available:

對這些類庫的引用使得下列基本互操作程序集可用:

·         Autodesk.AutoCAD.Interop.dll (for AutoCAD-specific typesAutoCAD專有類型)

·         Autodesk.AutoCAD.Interop.Common.dll (for types shared by ObjectDBX? host applications ObjectDBX?宿主應用程序共享類型)

The interop assemblies are located in the global assembly cache; they map automation objects to their .NET counterparts.

互操作程序集位于全局程序集緩存;他們將自動化對象映射為.NET的對等對象。

After you reference the type libraries, you can declare AutoCAD-based variables in Microsoft Visual Studio, as in the following examples:

引用了這些類庫,我們就可以在Microsoft Visual Studio中聲明AutoCAD變量,像下面的例子:

VB.NET

Dim objAcApp As Autodesk.AutoCAD.Interop.AcadApplication

Dim objLine As Autodesk.AutoCAD.Interop.Common.AcadLine

C#

Autodesk.AutoCAD.Interop.AcadApplication objAcApp;

Autodesk.AutoCAD.Interop.Common.AcadLine objLine;

Utilizing the interop assemblies can make the transitioning your VBA projects over to VB.NET much easier. However, in order to take full advantage of everything that .NET and the AutoCAD .NET API have to offer, you will need to rewrite your existing VBA code.

應用互操作程序集使得將VBA項目轉換為VB.NET項目更容易。不過,為了充分利用.NET和AutoCAD .NET API提供的全部功能,還是要重寫現有VBA代碼。

Create and Reference the AutoCAD Application 創(chuàng)建并引用AutoCAD應用程序

AutoCAD 2012 .NET applications can utilize the same type library (acax18enu.tlb) as AutoCAD automation projects. The type library is located in <drive>:\Program Files\Common Files\Autodesk Shared.

AutoCAD 2012 .NET應用程序可以和AutoCAD自動化項目一樣利用相同的類庫(acax18enu.tlb)。該類庫位于c:\Program Files\Common Files\Autodesk Shared

AutoCAD 2012 .NET applications also use the same version-dependent ProgID for the CreateObject, GetObject, and GetInterfaceObject functions. For example, CreateObject ("AutoCAD.Application.18") allows you to create an instance of AutoCAD and get an object that represents the new instance of the application.

AutoCAD 2012 .NET應用程序的CreateObject、GetObject和GetInterfaceObject函數也使用同樣的依賴版本的ProgID值。例如,CreateObject("AutoCAD.Application.18")允許我們創(chuàng)建一個AutoCAD的實例,并獲取代表應用程序新示例的對象。

 

3、Dependencies and Restrictions依賴性及限制

Unlike ActiveX Automation, there are fewer issues with library conflicts when other applications are installed, reinstalled, or uninstalled. The reason for fewer compatibility issues is that the .NET Framework is a standardized platform. However, you can still run into dependency issues. To avoid dependency issues with the .NET Framework, be sure to use the same or an earlier version of the .NET Framework with your VB.NET or C# project that AutoCAD 2012 uses. For information on which version of the .NET Framework you should be referencing, see Which Edition of Microsoft Visual Studio to Use.

不像ActiveX Automation,在其他程序安裝、重裝及卸載時很少出現庫沖突的情形。很少出現兼容問題的原因在于.NET Framework是一個標準化的平臺。不過,還是會遇到依賴性問題。要避免.NET Framework依賴性問題,應確保使用與AutoCAD2012所用.NET Framework相同或更早的版本來開發(fā)VB.NET或C#項目。更多信息見使用Microsoft Visual Studio哪個版本。

本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現有害或侵權內容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Microsoft.Office.Interop.Excel命名空間如何編譯為dll文件
InstallShield Limited Edition for Visual Studio 2015 圖文教程
LINQ體驗(1)——Visual Studio 2008新特性
IIS報錯未能正確加載此類型
IIS發(fā)布網站
Visual Studio 2008的10個技巧
更多類似文章 >>
生活服務
熱點新聞
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服