Printing Text Definitions
From PartKeepr Wiki
For a flexible rendering, we support replacing texts in the predefined text strings for the renderer. This is available to every renderer as a special class (PartKeepr\Printing\Utils\Placeholder) for Plugin developers. For users this has the advantage to alwayse have the same codewords which will be replaced. However the surrounding is dependent on the plugin. For e.g. for the DefaultPDFRenderer these surrounding is a !! , so a replacement looks like !!id!!.
Additional formatting of data
The data returned by the replacement can be configured to use a sprintf() [[1]] format string. This format string is appended with a ',' to the field name. For e.g. if you need a 6 digit wide 0 padded id, use !!id,%06d!!.
Replacements for Parts
Codeword | Description |
---|---|
id | The internal id of the database. E.g. 5 |
barcodeId | This id should be used for barcodes to get an easy to map and PartKeepr wide unique id for your object. For the moment, the format of this id is: ObjectId * 10 + ObjectType. ObjectId is the system wide unique id for the object (the same like the id above). The additional offset ObjectType will be used to determine the type of the object. For the moment the following assignments are used:
|
name | The name of the part. |
internalNumber | The internal part number field. |
description | The description for the part. |
categoryFull | The category including its path as you can see it in the parts list. |
categoryLast | Only the last (right) part of the category. |
footprintName | The name of the footprint |
storageLocationName | The name of the storage location |
Replacement for Storage Locations
Codeword | Description |
---|---|
id | The internal id of the database. E.g. 5 |
barcodeId | This id should be used for barcodes to get an easy to map and PartKeepr wide unique id for your object. For the moment, the format of this id is: ObjectId * 10 + ObjectType. ObjectId is the system wide unique id for the object (the same like the id above). The additional offset ObjectType will be used to determine the type of the object. For the moment the following assignments are used:
|
name | The name of the storage location. |