To run the Pro/TOOLKIT program in synchronization mode, you need to use the registration file. It records the required information of the Pro/TOOLKIT program so that the PROE program can find and load the Toolkit program.
When proe starts, it searches for registration files in the following ways to load toolkit programs.
A. In the config file, use the absolute path specified by protkdat, prodevdat, and toolkit_registry_file.
B. The protk. dat file or prodev. dat file in the current directory.
C. The protk. dat file or the prodev. dat file in the <Pro/ENGINEER>/<machine>/Text folder.
D. The protk. dat file or prodev. dat file in the <Pro/ENGINEER>/Text folder.
(Search order A-B-C-D)
<Pro/ENGINEER> indicates the installation directory of proe. <Machine> it is a sub-Folder related to the specific machine type, such as i486_nt.
If multiple registration files with the same name exist in the search path above, proe will take the first file as the standard and ignore subsequent registration files with the same name.
If multiple registration files with different names exist in the search path above, proe will read each registration file in sequence to load the Toolkit program.
Generally, the toolkit program is written in the method B. This is because the Toolkit program is loaded only when proe is started in the path that contains the registration file.
If the Toolkit program is compiled and submitted to the end user for use, the D method is recommended. In this case, the toolkit program is loaded wherever proe is started.
The format of the standard registration file in DLL mode is as follows:
Name yourapplicationname
Startup DLL
Exec_file $ loaddir/$ machine_type/obj/filename. dll
Text_dir $ loaddir
End
The specific meaning is:
Name --- the name specified by the Toolkit program must be unique.
Startup --- specifies the communication mode between proe and the Pro/TOOLKIT program. The above example specifies the DLL mode.
Exec_file --- specifies the Pro/TOOLKIT program to be loaded. The preceding example uses environment variables in the path to make it more flexible.
Text_dir --- specify the folder that contains the menu file and message file.
End --- end mark.
If you want to run the program in multi-process mode, make the following changes to the above registration file:
1. Modify the startup statement to startup spawn.
2. Modify the exec_file statement to point to the corresponding toolkit program.