GstarCAD 2022 .NET Upgrade Guide

Contents

ededd705b79520e342822dd5

Brief Introduction

This document describes how to upgrade the .Net project/application from a lower version of GstarCAD to GstarCAD 2022.

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, including 4K (3840 x 2160) monitor

  • GRX SDK 2022

  • GstarCAD 2022

  • .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.

fbfd77e11b5f8d26f1b77af8

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.

73d86e2dfbc924e46f499bc2 b9ad228380612eb09c4563ec

Load Reference File

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).

Literature/GSTARCAD/2022/03 API Guides/assets/NET Upgrade Guide assets/b78848743cd3370246a6da58 Literature/GSTARCAD/2022/03 API Guides/assets/NET Upgrade Guide assets/59e30a716495aa988d9b475c

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.

4f1d805e73396c33d05d0d32 b3ac1cb31c7f0e23b3042661

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.

58aade172a40f5ddd131665b 4f5a49fbbebb2bfe776377ef

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.

3fa2e27156b2193eaf56b026

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.

1daf359063c711fc23b31dc6 790c8857d3d52850f5f274ac

Load the Reference Files

Find the GstarCAD SDK 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)

ea228177d0b2b4f512b7f659 a3d64e4cbf8e93d594d3f740

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.

f545c89d34b83bd1f2a20016 b3ac1cb31c7f0e23b3042661

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.

2263408d8cdb13c38a8b5a04 c1e8b41a8170a666d6f6dffb

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 reserved: 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®.

.

7e68efdd9d538289df36c73c

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