comet.CProduct¶
- class comet.CProduct¶
This section describes all functions for the CProduct class.
See also
Methods¶
- CProduct.getID() CIDType¶
Get the record ID of the product.
This is a convenience function for calling
getAttribute()with keysconstants.kProductID,constants.kProductID2,constants.kProductID3andconstants.kProductStringID, assembled as aCIDTypeobject.- Returns:
The ID of the product
- Return type:
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- CProduct.setID(ID: tuple[int, int, int, str] | CIDType) None¶
Set the record ID of the product.
This is a convenience function for calling
setAttribute()with keysconstants.kProductID,constants.kProductID2,constants.kProductID3andconstants.kProductStringID.
- CProduct.getName() str¶
Get the name of a product.
This is a convenience function for calling
getAttribute()with keyconstants.kProductRow1- Returns:
The name of the product as displayed in the product pool
- Return type:
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- CProduct.getAttribute(key: int) str | int | list[CPageItem]¶
Fetch an attribute of a product. Depending on the attribute fetched, the return type may vary.
- Parameters:
key (int) –
The key of the attribute to be fetched.
For available selectors and the resulting return type see Product selectors.
- Returns:
The value which belongs to the key. The return type depends on the parameter key.
- Return type:
- Raises:
TypeError – When parameter key has wrong type
ValueError – When parameter key has invalid value
CometError – On internal error
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- Examples:
Get the established frames of a product. The information is only available in the proper context e.g. when the product is fetched from
product.getEstablished().
- CProduct.setAttribute(value: int | str) None¶
Set an attribute of a product.
The value type depends on the attribute you want to set which can be found at Product selectors.
- Parameters:
- Return type:
None
- Raises:
When parameter types are invalid
When parameter type of value mismatches the selector from key
ValueError – When parameter key has invalid value
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript: