GstarCAD 2020 .NET Upgrade Guide
GstarCAD 2020 .NET Upgrade Guide
Contents
- #Brief Introduction
- #Development Environment
- #VS2017 C# .NET Program Upgrade Process
- #VS2017 VB.NET Upgrade Process
- #Copyright
Brief Introduction
This document describes how to upgrade the .Net project/application from a lower version of GstarCAD to GstarCAD 2020.
Development Environment
-
Microsoft Visual Studio Enterprise 2017(Version 15.9.17)
-
CPU:
Basic Requirement:1.6 GHz CUP,Recommend:3.0 GHz CPU and above
- RAM:
Basic Requirement:2 GB,Recommend:8 GB and above
- Operation System
Windows 10 version 1507 and advanced version:Including home version, professional version, education version and enterprise version(not support LTSC and Windows 10 S)
Windows 8.1(with updated 2919355): Core version, professional version and enterprise version
Windows 7 SP1(with latest Windows updated): Including home version, professional version, enterprise version and Ultimate version
- Monitor Resolution:
Traditional monitor:1028 x 800 and above CRT monitor, High resolution and 4K (3840 x 2160) monitor
-
GRX SDK 2020
-
GstarCAD 2020
-
.NET Framework 4.8 and above
VS2017 C# .NET Program Upgrade Process
The following takes the creation of the "Hello" project as an example to illustrate the creation process. And assumes that the GstarCAD SDK is installed in the “c:\grxsdk” directory.
Change Reference Files
Remove the Reference
Right click on the reference files that referenced to the previous version of GstarCAD, click Remove.
Add Reference
In VS 2017, find the Hello project you have been created on the solution explorer. Select the Hello project and right click to select Add Reference. After the "Reference Manager" dialog box pops out, click Browse button as shown below.
Choose and Add the Files
Find the GstarCADSDK installation path, for example, “C:\grxsdk\inc”. Select gmap.dll and gmdb.dll files in “c:\grxsdk\inc-x86” and add them by clicking Add button(If you use GstarCAD 64-bit version, please select GrxCAD.Interop.dll in inc-x64).
Remark:gmap.dll and gmdb.dll have to be added but file GrxCAD.Interop.dll is optional.
After adding the files, right click each added reference file, click Property at the context menu, then the "Reference Properties" palette pops up, change the "Copy Local" property from True to False. The following image shows how to change "Copy Local" property for gmap.dll file. Please take it as reference to change gmdb.dll file's Copy Local property.
Change the Target Framework
In VS 2017, find the Hello project you have been created on the solution explorer. Right click to select Properties. After the new page opens, please change the "Target framework" to Framework 4.8 from the pull-down list in Application menu.
Compile Program
Click Visual Studio 2017 menu item [Build] » [Build solution], regenerate the dll file in the corresponding directory.
Run GstarCAD and input "netload" at command line, there will a "Select .Net Assembly" dialog box pops out, select the relative dll file and click Open button to load it
VS2017 VB.NET Upgrade Process
The following takes the creation of the "Hello" project as an example to illustrate the creation process. And assumes that the GstarCAD SDK is installed in the “c:\grxsdk” directory.
Change Reference Files (2)
Remove the Reference (2)
Right click on the reference files that referenced to the previous version of GstarCAD, click Remove.
Add Reference (2)
In VS 2017, find the Hello project you have been created on the solution explorer. Select the Hello project and right click to select Add Reference. After the "Reference Manager" dialog box pops out, click Browse button as shown below.
Choose and Add the Files (2)
Find the GstarCADSDK installation path, for example, “C:\grxsdk\inc”. Select gmap.dll and gmdb.dll files in “c:\grxsdk\inc-x86” and add them by clicking Add button(If you use GstarCAD 64-bit version, please select GrxCAD.Interop.dll in inc-x64)
Remark:gmap.dll and gmdb.dll have to be added but file GrxCAD.Interop.dll is optional.
After adding the files, right click each added reference file, click Property at the context menu, then the "Reference Properties" palette pops up, change the "Copy Local" property from True to False. The following image shows how to change "Copy Local" property for gmap.dll file. Please take it as reference to change gmdb.dll file's Copy Local property.
Change the Target Frame
In VS 2017, find the Hello project you have been created on the solution explorer. Right click to select Properties. After the new page opens, please change the "Target framework" to Framework 4.8 from the pull-down list in Application menu.
Compile Program (2)
Click Visual Studio 2017 menu item [Build] » [Build solution], regenerate the dll file in the corresponding directory.
Run GstarCAD and input "netload" at command line, there will a "Select .Net Assembly" dialog box pops out, select the relative dll file and click Open button to load it
Copyright
Copyright reserved: Xi’an Gstarsoft Co.,Ltd
Usage License: Allows copying, quote any part of this document. Changes of any part of this document are forbidden without authorization. Please keep this statement when copying and quoting it, otherwise it will be held liable.
- AutoCAD® is a product of Autodesk® Company which is one of the CAD software solution providers. ARX is an abbreviated name of ObjectARX, which is AutoCAD® Runtime eXtension, and C++ SDK provided by Autodesk®.
.
PDF page 11 — additional source text
11
PDF page 12 — additional source text
12
PDF page 13 — additional source text
13
PDF page 14 — additional source text
14