GstarCAD 2020 .NET Upgrade Guide

Contents

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/375820527aff2641e6de49e7

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.

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/f5a9bc6af90a5b76abce6345

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.

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/282ec10a8fc6c5a256014118 Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/2e432b9ccb31f7b32e16fa45

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

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/ebb3fc8c4e444c74d8826a5a Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/23907fccbf2fcbecfd28f1af

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.

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/ed3ae87762241027baf6a1bc Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/871c613b4cad26aa66bd53ac

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.

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/d8b3e4e6e15e48c429154eea Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/ec68588d508f524185c60629

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.

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/3245262a21f2abcae1382267

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.

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/6df8fd300c746c3e9c9399a2 Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/eb31eacc981c924f42d9b0da

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)

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/ebb3fc8c4e444c74d8826a5a Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/23907fccbf2fcbecfd28f1af

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.

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/c5f22f715c7e3869b296a891 Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/871c613b4cad26aa66bd53ac

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.

Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/3141f8afdf53db1ea4a33525 Literature/GSTARCAD/2020/03 API Guides/NET/assets/NET Upgrade Guide assets/64941c4eca341394667992ff

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: 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