How AppData-Specified Custom Modules Override the Default Module
You do not have to add the names of your custom modules to AppData if you want your tools to only use the custom modules that they specify in their calls to GetDocPerl and PutDocPerl.
For instance if you write a tool script named EpicAcme.pl that is based on a copy of EpicEditCat.pl you can assign the custom module name CustomGetDocEpicAcme.pm to the variable $CustomModule before the call to GetDocPerl and your custom module is used when GetDocPerl is invoked.
- Document Type—is based on the value in the SDL Contenta object’s Document Type property sheet field. Where the SDL Contenta object is the object that is selected by the user before the tool is selected in the application; SDL Contenta Explorer or SDL Contenta Web.
- ToolsName—as specified in first field of the CustomArgs string passed to GetDocPerl and PutDocPerl methods.
For example: If value in the Document Type property data field, is PLAY, then the first of these keys is named PLAY. If the filename of the custom tool is XmEdit.exe (that is, the script or executable launched by CE), then the name of the second key is XmEdit.exe.
If no match is found in AppData, the Custom module used by the adapter is the one named in the second field of the CustomArgs string passed to GetDocPerl( ) or PutDocPerl( ).
You are not required to specify a custom module in the CustomArgs string that you pass to GetDocPerl( ) or PutDocPerl( ), as long as you plan to use AppData to specify which custom module to use for any given Document Type. It is recommended that you use a placeholder string that serves as a comment, such as CustomModuleDefinedInAppData. In that case, the CustomArg string can read:
orMyPublish.pl|CustomModuleDefinedInAppData|MyPublish.pl|CustomModuleDefinedInAppData|d:\temp\pub|
- You want the XmetalEdit tool, XmEdit.exe, to work with two different doctypes. You created a pair of custom modules for each doctype, where book and milspec are the doctypes. The names of your custom modules are: CustomGetDocXmBook.pm, CustomPutDocXmBook.pm, CustomGetDocXmMil.pm, CustomPutDocXmMil.pm
- For example: You want two versions of the XmetalEdit tool, that each use a different pair of custom modules that you wrote, but the data edited uses the same doctype. In this case you can copy XmEdit.exe to, for example, XmEdit2.exe. You enter XmEdit.exe for the name of one tool in AppData along with the custom modules you want used with it, then enter XmEdit2.exe for the other tool and enter the module names for that tool.