GstarCAD 2022 Application Auto Load
GstarCAD 2022 Application Auto Load
Contents
Via “application.ldr” File
Create the “Application.ldr” file in the installation path of GstarCAD. Then edit and add the path of the GRX file which needs to be loaded.
This method is only available for GRX application, not for .NET application.
Via Lisp File
Add the following code in the gcaddoc.lsp, which is located in the installation directory\Support\gcad2022doc.lsp.
(load "###.lsp")
Create and edit the ###.lsp file, then places it in the file search path which is supported by the program. After that, edit the content as:
(command "netload" "***.dll")
(command "arx" "l" "***.grx")
Add the GRX or DLL files which need to be loaded.
The GRX program file path could be the full path of the file or the file name. If use the file name, the GRX program must be in the file search path which is supported by the program.
The NET program file path could be the full path of the file or the file name. If use the file name, the NET program must be in the installation directory.
The file path format is as follows: "C:\Folder\ your.dll"
Via Startup Group
Open the Registry and find the path as below:
HKEY_CURRENT_USER\Software\Gstarsoft\GstarCAD\R22\en-WW\Profiles<<Unnamed Profile>>\Dialogs\Appload\Startup
Set in the registry:
DWORD type NumStartup key, set the value as: the number of programs to be loaded
String type: #Startup key, "#" represents then number. Set the value as: GRX or DLL path
For example:
When CAD starts, it will get the value of 0Startup-(NumStartUp-1)Startup registry key, then get the information of the application and load it.
The path requirement is similar with mentioned in the last paragraph, but the format does not need to use "\", just like " is enough.
The startup group also supports load the lsp file, but it is not recommended here. Because the lsp program will not only be loaded when the program is started, but also will be loaded every time a drawing is opened or a new drawing is created.
Via Registry
Create the registry key with the following path manually or by code:
HKEY_CURRENT_USER\SOFTWARE\Gstarsoft\GstarCAD\R22\en-WW\Applications
Or you can get the following path via the code “acrxProductKey()”:
HKEY_CURRENT_USER\SOFTWARE\Gstarsoft\GstarCAD\R22\en-WW\
Add the Application (Must be "Applications", application can't work here) item. Then create a new item under this item and add following keys under this it:
DWORD type MANAGED key, set the value as: 0 means grx program, 1 means NET program.
Loader key of string type, set the value as: grx or dll path, this method only supports net program and grx program.
For example:
The path requirement is similar with mentioned in the last paragraph.
