The CardExchange® Producer plug-in framework has a hidden feature, which is the possibility to define a void plug-in. Void plug-ins offer two possibilities that are otherwise not possible:
Controlling when a .NET Function is executed
Using a single manual entry for multiple card items.
Plug-ins are only available in CardExchange® Producer Enterprise and Business edtions
Description
Avoid plug-in is created by defining a plug-in that does not reference a real plug-in DLL. If CardExchange® Producer detects that no real plug-in is selected, it creates an internal plug-in with one input parameter, called "Definition", and one output parameter, called "Results". When executed, the plug-in copies the value of the input parameter to the output parameter.
By mapping a .NET function to the Definition parameter of a void plug-in, it is possible to combine the advantages of .NET Functions with the advantages of plug-ins, that is, you can develop your own .NET functions and you can still control when the function is executed by using the settings in the plug-in wizards.
By mapping the Definition parameter to a manual entry, you can use the results of a single manual entry in multiple mappings. That makes it possible to have a single manual entry whose value is both printed on the card and stored in the databse.
For manual entries, you will often want void plug-in to be executed whenever you call a preview. However, when the void plug-in is used in combination with a .NET function, you will often prefer to execute it during the print process only, or when clicking a button.
Example
To illustrate how void plug-ins work, we will create a card definition with a single manual entry that is both printed on the card and stored in the database.
To start, create a new card layout with a text object linked to a variable called "ManualText" and a data definition with a storage item called "ManualText".
Select "Do you want to use external functions or plug-ins" in the card-definition wizard and click the Edit button to configure the plug-in.
Add a plug-in called "ManualText" and type "void" in the DLL-file field. Then click Finish.
4. Click Next to go to the mappings window and map the visible item called "ManualText" to the plug- in output "ManualText.Result". Then map the plug-in input "ManualText.Definition" to "Enter manually".
5. Select the Storage items tab and map the storage item "ManualText" to the external function
output.
Click Finish to close the card-definition wizard and open the manual-entry window. You will see, that
there is a single manual entry.
7. Print the card. You will now see that the manual entry is stored in the database.
Other input sources can be used for Void Plug-ins, such as a print date or an environment variable.
The point at which the plug-in is processed can then be controlled instead of always being processed at print time.
US business only within scope
ISO/IEC 27001:2013
2010 Elkins Way, Suite 1122
Brentwood, CA 94513
Monday – Friday
9am – 5pm (EST)
+1 (925) 529 4999
Smallepad 32
3811 MG Amersfoort
Monday – Friday
9am – 5pm (CET)
+31 (0)20 2251 447