GstarCAD 2020 .NET Upgrade Guide
GstarCAD 2020 .NET Upgrade Guide
Table of Contents
1. Brief Introduction ........................................................................ 3
2. Development Environment ......................................................... 4
3. VS2017 C# .NET Program Upgrade Process ............................ 5
3.1. Change Reference Files .................................................... 5
3.2. Compile Program ............................................................... 9
4. VS2017 VB.NET Upgrade Process .......................................... 10
4.1. Change Reference Files .................................................. 10
4.2. Compile Program ............................................................. 14
5. Copyright.................................................................................. 15
2
1. Brief Introduction
This document describes how to upgrade the .Net project/application from a lower version
of GstarCAD to GstarCAD 2020.
3
2. Development Environment
CPU:
RAM:
Operation System
version, education version and enterprise version(not support LTSC and Windows 10 S)
version
Monitor Resolution:
Traditional monitor:1028 x 800 and above CRT monitor, High resolution and 4K (3840 x
2160) monitor
GstarCAD 2020
4
3. VS2017 C# .NET Program Upgrade Process
The following is a sample to create a "Hello" project, describe the creation process and
Right click on the reference files that referenced to the previous version of GstarCAD,
click Remove.
the Hello project and right click to select Add Reference. After the "Reference Manager"
5
3.1.3. 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
6
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.
7
3.1.4. 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
8
3.2. Compile Program
Click Visual Studio 2017 menu item [Build] » [Build solution], then you will get a “Hello.dll”
Run GstarCAD and input "netload" at command line, there will a "Select .Net Assembly"
dialog box pops out, select the "Hello.dll" file and click Open button to load it
9
4. VS2017 VB.NET Upgrade Process
The following is a sample to create a "Hello" project, describe the creation process and
Right click on the reference files that referenced to the previous version of GstarCAD,
click Remove.
the Hello project and right click to select Add Reference. After the "Reference Manager"
10
11
4.1.3. 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
12
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.
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
13
4.2. Compile Program
Click Visual Studio 2017 menu item [Build] » [Build solution], then you will get a “Hello.vb”
Run GstarCAD and input "netload" at command line, there will a "Select .Net Assembly"
dialog box pops out, select the "Hello.vb" file and click Open button to load it
14
5. Copyright
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
15