DOTNET Migration Manual

ZWCAD 2024 Help
DOTNET Migration Manual

How to migrate a .NET program from AutoCAD to ZWCAD2024. The following takes the HelloWorld project in ObjectARX_2019 as an example to show the steps:

  1. Open the project file with VS2017.

  2. Change the Target Framework to .NET Framework4.7 in the project properties.

1) If it is a C# project or VB project, right-click Project - Properties, and change the Target Framework in the Application tab.

For Windows XP Version, change the Target Framework to .NET Framework 4.

  3. Replace the library references “accoremgd.dll” “acdbmgd.dll” and “acmgd.dll” that are relevant to Autodesk. If “Autodesk.AutoCAD.Interop” and “Autodesk.AutoCAD.Interop.Common” exist, they also need to be replaced;

1) If it is a C# project or VB project, you just need to expand the References under the project. Select an ACAD library reference, right-click, and then select Remove from the shortcut menu to delete it.

You can add ZWCAD2024 library references by selecting Add Reference from the shortcut menu displayed when you right-click References.

  4. Replace all “Autodesk.AutoCAD” with ZwSoft.ZwCAD, replace “Acad” with “Zcad”, and replace “AutoCAD” with “ZwCAD” in the source files of the project.

Besides, if the following is contained in a project:

Imports Autodesk.AutoCAD.Interop

It should be changed to: Imports ZWCAD

Similarly: Dim acadApp As Autodesk.AutoCAD.Interop.AcadApplication

Should be changed to: Dim zcadApp As ZcadApplication

  5. Compile the project to generate a dll file.

  6. Run ZWCAD2024, and enter the NETLOAD command to load the dll file output by the project.

  7. Check the project effect in ZWCAD2024:

The following commands are newly added:

NOTE:

If any compile error occurs after you followed the above steps, it could be those types or members are not temporarily supported by ZWCAD2024. Please refer to the DOTNET reference to see if relevant introduction exists or not. If there is no introduction, please feedback problems to us. We will solve .NET problems you concerned as soon as possible.

© 1998-2023 ZWSOFT CO., LTD.(Guangzhou). All Rights Reserved.