GstarCAD 2022 GRX Upgrade Guide

Contents

4e0842fe19a9fe21daf3db54

Introduction

This guide helps user to upgrade the GRX which adapt the lower GstarCAD version to the latest GRX to adapt 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 60) monitor

  • GRX SDK 2022

  • GstarCAD 2022

  • .NET Framework 4.8 and above

Original Code

GRX Project: GRX 2019 or GRX 2020 application source code needs to be migrated to VS2017 compile environment first, and then compile it in the form of multi-byte character sets and multi-thread.

Install SDK

Download GstarCAD SDK package from our official website: https://www.gstarcad.net/download/

After you get the GRXSDK.ZIP file, please extract it to your disk directory, for instance, C:\grxsdk. Afterwards you will get 6 files, which they are inc,inc-x64,inc-x86,lib-x64,lib-x86 and samples.

  • The Inc file includes header files

  • The inc-x64 file includes the files used in COM and .NET for 64 bit

  • The inc-x86 file includes the files used in COM and .NET for 32 bit

  • The lib-x64 file includes the files referenced from GRX library

  • The lib-x86 file includes the files referenced from GRX library

  • Samples includes project files, they are dotnet,fact_dg,HelloADS,HelloARX,SimplePalette, etc.

The instruction of sample projects:

  • Dotnet includes dotnet samples,including addline,hello,vbhello, etc.
  1. Addline is the .NET sample for adding solid line.

  2. Hello is .NET sample for prompting the information of output.

  3. Vbhello is the sample to develop with .NET API under vb.net.

  • fact_dg is the sample for defining LSP function.

  • HelloADS is the project sample to develop the type of ADS.

  • HelloARX is the sample to develop with ARX API.

  • SimplePalette is the sample to develop the type modules for palette.

GstarCAD 2022 GRX Project Upgrade Process

The following is a sample to upgrade" HelloARX "project.

  1. Open the project with VS 2017, click OK button after setting Platform Toolset to Upgrade to V141 in "Review Solution Actions" dialog box. If this dialog box doesn't pop up automatically, you can find Platform Toolset from General and then choose "Visual Studio 2017 (v141)" manually.
41386bca4385bf36e9d18d0e
  1. In Visual Studio 2017 "Solution Explore", right click on the project and click Properties from context menu. Then the "HelloArx Property Pages" dialog box will be opened as shown below.
75e371042ba8daa67fc4ea3a
  1. Select the C/C++ Node under Configuration Properties and set Additional Include Directories of General as C:\grxsdk\inc\arx

  2. Select Linker and set the configurations as below:

General-Additional Library Directories set to (If 32-Bit): C:\grxsdk\lib-x86

General-Additional Library Directories set to (If 64-Bit):C:\grxsdk\lib-x64

Input-Module Definition File set to:C:\grxsdk\inc\arx\RxExport.def

  1. Click Bulid-Build Solution from menu in Vs 2017, and you will get a HelloARX.grx file after compiling. Which means the upgrade process complete.

  2. Run GstarCAD 2022, input APPLOAD command to load HelloARX.grx generated from above step, and then input HelloWorld in the command line. After that "Hello World" will output at the command line.

7b2e52bcd705f963e1a63e1d 59bdd5f33826016c56ab4ac8

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®
Literature/GSTARCAD/2022/03 API Guides/assets/GRX Upgrade Guide assets/61a502cd5592a876f6f56d83