The pdPropAdd function adds a PowerDoc property to the PowerDoc object referenced by obj. A property is one of the basic PowerDoc field types.
Parameter | Description | ||||
---|---|---|---|---|---|
power_doc |
Handle of the associated Power Engine document. | ||||
obj |
Object's index in the Power Engine document. | ||||
name |
A numerical value that identifies the property to be added. Can be a user-defined value or one of the following predefined PowerDoc values:
| ||||
value |
The value of the property. It can be supplied as native binary data or as a standard null-terminated C/C++ string that Power Engine will transparently convert to a PowerDoc property value in the native binary format (Power Engine will internally use the pdMakeBinary function to perform this conversion). For more information, see Guidelines For Creating PowerDoc Objects. | ||||
len (or Format Identifier) |
When value is supplied as native binary data, this parameter is a positive integer that specifies the length of the binary data in bytes. If, however, value represents a null-terminated C/C++ string to be converted to the native binary format, this parameter is a Format Identifier (which is always a negative integer). For a list of possible format identifiers, please see Note 1. |
If the function was successful, the return value is 1. Otherwise, the function returns 0 (bad input) or -1 (memory error).
To avoid unexpected rendering results, properties must be assigned to PowerDoc objects in accordance with D-Type's Guidelines For Creating PowerDoc Objects.
pdPropGet, pdPropSet
pdPropDel
Currently supported PowerDoc format identifiers:
PD_BYTE_SIGNED — a string converted to a single signed byte
PD_ARR_BYTE_SIGNED — a string converted to an array of signed bytes
Individual elements of the array should be seprated by a single comma and/or space character.
PD_BYTE_UNSIGNED — a string converted to a single unsigned byte
PD_ARR_BYTE_UNSIGNED — a string converted to an array of unsigned bytes
Individual elements of the array should be seprated by a single comma and/or space character.
PD_WORD_SIGNED — a string converted to a signed 2-byte integer
PD_ARR_WORD_SIGNED — a string converted to an array of signed 2-byte integers
Individual elements of the array should be seprated by a single comma and/or space character.
PD_WORD_UNSIGNED — a string converted to an unsigned 2-byte integer
PD_ARR_WORD_UNSIGNED — a string converted to an array of unsigned 2-byte integers
Individual elements of the array should be seprated by a single comma and/or space character.
PD_TRIO_SIGNED — a string converted to a signed 3-byte integer
PD_ARR_TRIO_SIGNED — a string converted to an array of signed 3-byte integers
Individual elements of the array should be seprated by a single comma and/or space character.
PD_TRIO_UNSIGNED — a string converted to an unsigned 3-byte integer
PD_ARR_TRIO_UNSIGNED — a string converted to an array of unsigned 3-byte integers
Individual elements of the array should be seprated by a single comma and/or space character.
PD_LONG_SIGNED — a string converted to a signed 4-byte integer
PD_ARR_LONG_SIGNED — a string converted to an array of signed 4-byte integers
Individual elements of the array should be seprated by a single comma and/or space character.
PD_LONG_UNSIGNED — a string converted to an unsigned 4-byte integer
PD_ARR_LONG_UNSIGNED — a string converted to an array of unsigned 4-byte integers
Individual elements of the array should be seprated by a single comma and/or space character.
PD_ASC — a string of ASCII characters converted to an array of bytes
PD_HEX — a string of 2-digit HEX values converted to an array of bytes.
(when applicable, the expected length of the array will be indicated)
Although PD_HEX is a general purpose format, it is used as the default storage format only for properties whose value strings cannot be conveniently represented in any other way (for example: bitmap's pixels or other binary data).
PD_DEFAULT — a string converted to the property's default storage format.
Depending on the property in question, this can be any of the above format identifiers.
PD_ARR_BYTE_SIGNED_COMPRESS — Same as PD_ARR_BYTE_SIGNED but indicates that the supplied array of bytes should be compressed using compression method 006.
PD_ARR_BYTE_UNSIGNED_COMPRESS — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 006.
PD_ARR_WORD_SIGNED_COMPRESS — Same as PD_ARR_WORD_SIGNED but indicates that the supplied array of bytes should be compressed using compression method 004.
PD_ARR_WORD_UNSIGNED_COMPRESS — Same as PD_ARR_WORD_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 004.
PD_ARR_TRIO_SIGNED_COMPRESS — Same as PD_ARR_TRIO_SIGNED but indicates that the supplied array of bytes should be compressed using compression method 002.
PD_ARR_TRIO_UNSIGNED_COMPRESS — Same as PD_ARR_TRIO_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 002.
PD_ARR_LONG_SIGNED_COMPRESS — Same as PD_ARR_LONG_SIGNED but indicates that the supplied array of bytes should be compressed using compression method 000.
PD_ARR_LONG_UNSIGNED_COMPRESS — Same as PD_ARR_LONG_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 000.
PD_ARR_COMPRESS_METHOD_000 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 000.
PD_ARR_COMPRESS_METHOD_002 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 002.
PD_ARR_COMPRESS_METHOD_004 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 004.
PD_ARR_COMPRESS_METHOD_006 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 006.
PD_ARR_COMPRESS_METHOD_008 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 008.
PD_ARR_COMPRESS_METHOD_009 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 009.
PD_ARR_COMPRESS_METHOD_010 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 010.
PD_ARR_COMPRESS_METHOD_011 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 011.
PD_ARR_COMPRESS_METHOD_012 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 012.
PD_ARR_COMPRESS_METHOD_015 — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes should be compressed using compression method 015.
PD_HEX_COMPRESS_METHOD_000 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 000.
PD_HEX_COMPRESS_METHOD_002 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 002.
PD_HEX_COMPRESS_METHOD_004 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 004.
PD_HEX_COMPRESS_METHOD_006 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 006.
PD_HEX_COMPRESS_METHOD_008 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 008.
PD_HEX_COMPRESS_METHOD_009 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 009.
PD_HEX_COMPRESS_METHOD_010 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 010.
PD_HEX_COMPRESS_METHOD_011 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 011.
PD_HEX_COMPRESS_METHOD_012 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 012.
PD_HEX_COMPRESS_METHOD_015 — Same as PD_HEX but indicates that the supplied array of bytes should be compressed using compression method 015.
PD_ARR_COMPRESSED — Same as PD_ARR_BYTE_UNSIGNED but indicates that the supplied array of bytes is already compressed using one of the above compression methods.
PD_HEX_COMPRESSED — Same as PD_HEX but indicates that the supplied array of bytes is already compressed using one of the above compression methods.