typedef struct pro_argument
{
ProName label;
ProValueData value;
} ProArgument;
• | Integer |
• | Double |
• | String (char*) |
• | String (wchar_t*) |
• | Boolean |
• | ProSelection |
• | ProMatrix |
|
|
|
|
|
|
typedef ProError (*ProTkdllFunction) (
ProArgument* inputs, ProArgument** outputs );
• | Ensure that the contents of the input ProArgument array are not freed. This is taken care of by the calling application and the Creo TOOLKIT communications code. |
• | Use the ProValuedata*Set() functions to assign values to the output ProArgument array. This allows the calling application to free the output array with ProArgumentProarrayFree(). |
|
|
|
|
|
• | app_name—The name of the application to initialize. |
• | exec_file—The DLL file to load, including its full path. |
• | text_dir—The path to the application’s message and UI text files. |
• | user_display—Set this parameter to PRO_B_TRUE if you want the interactive user to be able to see the application registered in the Creo Parametric User Interface and to see error messages if the application fails. |
• | Compose the Creo TOOLKIT DLL containing a function that meets the criteria for a custom DLL task function. Refer to the Creating Creo TOOLKIT DLL Task Libraries section for the function signature. Use the standard Creo Distributed Batch arguments while coding the function. Refer to the Coding a Custom DLL Task Function section for more information on the arguments. |
• | Create a DLL registry file for Creo Distributed Batch. Refer to the Registry File for Custom DLL Tasks section for more information. |
• | Create a TTD (Task Type Definition) file specifying the Creo TOOLKIT DLL and the custom task function to be executed by the custom task. Refer to the TTD File Format for Custom DLL Tasks section for more information. |
• | DBS_WORKING_DIRECTORY—Specifies the full path of the working directory for the Creo Distributed Batch service. It stores all thelog, inf, and output files generated during the execution of a custom task. |
• | DBS_CURRENT_OBJECT_NAME—Specifies the name of the object that will acted upon by the custom DLL task function. |
• | DBS_CURRENT_OBJECT_TYPE—Specifies the type of the object such as a 3D model, assembly, or drawing. The value of this argument will be a widestring containing an integer value of the type that matches with the values in the enumerated type ProMdlType. |
• | DBS_CURRENT_OBJECT_NAME—Specifies the name of the generated object. This output informs Creo Distributed Batch that a model with this name should be used for other TTD entries that follow. |
• | DBS_CURRENT_OBJECT_TYPE—Specifies the type of the generated object such as a 3D model, assembly, or drawing. The value of this argument will be a widestring containing an integer value of the type that matches with the values in the enumerated type ProMdlType. This output informs Creo Distributed Batch that a model of this type should be used for other TTD entries that follow. |
• | DBS_IGNORE_FILE—By default, the Creo Distributed Batch service returns any file generated in the working directory, except for report type files such as log, inf and txt. The names of the files specified by this output argument will not be included in the output returned to the client. You can return more than one argument of this type. |
• | DBS_OUTPUT_FILE—Some file types such as log, inf and txt are not transferred to the Creo Distributed Batch client by default. File names specified by this output argument indicate that a particular file such as trail.txt should be passed back to the client. This file is always returned even if Creo Distributed Batch ignores it. This argument is not required for files returned by default. You can return more than one argument of this type. |
• | DBS_OUTPUT_DIRECTORY—Specifies the output directory containing all files except ones such as trail files or log files that are ignored by Creo Distributed Batch. This optional argument is required only if the contents of the output directory are different from the input working directory. |
• | DBS_MESSAGE—Specifies the user-visible message that will be printed in the log file generated by the custom DLL task function. This message is especially useful if the function returns an error. |
• | PRO_TK_NO_ERROR—Specifies that the task function executed successfully. |
• | PRO_TK_BAD_INPUTS—Specifies that the task function was called with incorrect input arguments. |
name pt_userguide.dll exec_file <creo_toolkit_loadpoint>/$<machine_type>/obj/pt_userguide.dll text_dir <creo_toolkit_loadpoint>/protk_appls/pt_userguide/text where: <creo_toolkit_loadpoint> refers to the directory that forms the loadpoint of
Creo Parametric TOOLKIT under the Creo Parametric installation. <machine_type> refers to the type of machine on which Creo Parametric
is installed. For example x86e_win64.
• | name—Specifies the name of the Creo TOOLKIT DLL to be used as the dllname attribute in the TTD file. |
• | exec_file—Specifies the full path to the DLL binary file on the service machine. |
• | text_dir—Specifies the directory containing language-specific directories that include the menu and message files used by the DLL. |
<TTD version="1.0" created_by="PTC"> <DESCRIPTION>Load and call external DLL to change the current model to simprep</DESCRIPTION> <DETAILS>Load an external Creo Parametric TOOLKIT DLL into the Creo Parametric session</DETAILS> <SERVICE name="dbatchs"/> <TKFUNC func="ProToolkitTaskExecute" dllname="pt_userguide.dll"> <DLL_FUNCTION>TestSimprepActivateTask</DLL_FUNCTION> <USER_DATA name="SIMP_REP">NO_B</USER_DATA> </TKFUNC> <!-- Export to VRML format --> <TKFUNC func="ProExportVRML"> </TKFUNC> </TTD>
• | Code reuse through the ability to create J-Link libraries that can be called from Creo TOOLKIT or other APIs. |
• | Creation of platform independent library routines. |
• | app_name—Assigns a unique name to this J-Link application. |
• | java_app_class—Specifies the fully qualified class and package name of the Java class that contains the J-Link application’s start and stop method. |
• | java_app_start—Specifies the start method of the program. |
• | java_app_stop—Specifies the stop method of the program. |
• | java_app_add_classpath—Specifies the locations of packages and classes that can be loaded when running a Java program. Can be NULL, if not needed |
• | text_dir —Specifies the application text path for menus and messages. Can be NULL if the application does not use menus or messages. |
• | user_display—Specifies whether to display the application in the Auxiliary Applications dialog box in Creo Parametric. |
• | handle—Specifies the handle to the J-Link application. |
• | task_id—Specifies the task to be executed. The J-Link application should register the task using the J-Link method pfcSession.BaseSession.RegisterTask(). Refer to J-Link documentation for more information on the RegisterTask() method. |
• | input_args—Specifies the input arguments to be passed to the task. |