Changelog ******************************************************************************* :priint-important:`The priint:comet Python API is now considered stable. This changelog will be removed in the future. All changes are now part of the main changelogs:` - `priint:comet InDesign ® <../news_4.3.html>`_ - `priint:comet_pdf <../news_comet_pdf_4.3.html>`_ - `priint:comet Illustrator ® <../news_illustrator_4.3.html>`_ .. raw:: html

Legacy version history

This section contains all changes made during the beta phase by version to the priint:comet Python API. Each release can contain two sections: .. container:: priint-block-green :priint-green:`Compatible changes` These changes extend functionality or fix errors and can generally be considered compatible with existing project implementations. There is usually no need to change existing code for these changes to take effect. .. container:: priint-block-important :priint-red:`Incompatible changes:` These changes require changes to existing project implementations or will generally cause existing scripts to fail or behave differently. These changes usually are fixes to severe errors or restructuring of the priint:comet Python API. .. container:: priint-block **R33520** .. container:: priint-block-green :priint-green:`Compatible changes` - **New functions**: - |indd_small| |comet-pdf_small| |illu_small| :py:func:`.comet.inch2pt` - |indd_small| |comet-pdf_small| |illu_small| :py:func:`.comet.pt2inch` .. container:: priint-block **R33466** .. container:: priint-block-green :priint-green:`Compatible changes` - **Fixes**: - |indd_small| |comet-pdf_small| Cannot add arguments to comet.placeholder.loadServer (`TW #2685384 `_) .. container:: priint-block **R33000** .. container:: priint-block-green :priint-green:`Compatible changes` - **New modules**: - :py:mod:`.progress` - **New functions**: - |indd_small| :py:func:`.prefs.getShowURLProgress` - |indd_small| :py:func:`.prefs.setShowURLProgress` - |indd_small| :py:func:`.progress.start` - |indd_small| :py:func:`.progress.step` - |indd_small| :py:func:`.progress.stop` .. container:: priint-block **R32862** .. container:: priint-block-green :priint-green:`Compatible changes` - **New functions**: - |indd_small| |comet-pdf_small| :py:meth:`.CDocument.getMetaData` - |indd_small| |comet-pdf_small| :py:meth:`.CDocument.setMetaData` .. container:: priint-block **R32762** .. container:: priint-block-green :priint-green:`Compatible changes` - **New functions**: - |indd_small| |comet-pdf_small| :py:func:`.placeholder.loadDataProvider` - **Fixes**: - |comet-pdf_small| frame placeholder actions always error out with syntax errors. - |comet-pdf_small| placeholder actions error out when function variables are used which only have default values. - :py:func:`.wlog` does not respect extened logging configuration. .. container:: priint-block **R32735** .. container:: priint-block-green :priint-green:`Compatible changes` - Global variables from the *Settings* panel are now supported. - **New functions**: - |indd_small| :py:func:`.test.getDefaultDefinitionFile` - |indd_small| :py:func:`.test.connect` - |indd_small| :py:func:`.test.disconnect` - |indd_small| :py:func:`.test.execute` - |indd_small| :py:func:`.test.createProofs` - |indd_small| :py:func:`.test.deleteProofs` - |indd_small| :py:func:`.test.deleteResults` - |indd_small| :py:func:`.test.assertion` - **Fixes**: - :py:func:`.frame.createTextFrame` parameter *page* is not considered default and must always be provided. - |indd_small| |comet-pdf_small| :py:func:`.frame.createTextFrame` interprets page number wrongly. - |indd_small| |comet-pdf_small| :py:func:`.placeholder.getTagValue` does not yield any valid result. - |illu_small| :py:meth:`.CPageItem.getPage` does not work for horizontal or vertical lines. .. container:: priint-block **R32585** **No changes** .. container:: priint-block **R32423** .. container:: priint-block-green :priint-green:`Compatible changes` - |indd_small| Loading product pool entries is now supported. All environment variables for the context :ref:`ENV-kContextProductPoolEntries` are now implemented. - :py:meth:`.CFrame.setImage` now has an additional *options* parameter for selecting PDF pages and cropboxes when inserting a PDF .. container:: priint-block-important :priint-red:`Incompatible changes` - :py:func:`.placeholder.load` changed parameter name *applyRules* to *applyLayoutRules* - :py:meth:`.CRect.moveTo` changed default value of parameter *refPoint* from :py:data:`comet.kRefPointCenter` to :py:data:`comet.kRefPointTopLeft`. - :py:meth:`.CRect.adjust` changed default value of parameter *refPoint* from :py:data:`comet.kRefPointCenter` to :py:data:`comet.kRefPointTopLeft`. - :py:meth:`.CRect.setWidth` changed default value of parameter *refPoint* from :py:data:`comet.kRefPointCenter` to :py:data:`comet.kRefPointTopLeft`. - :py:meth:`.CRect.setHeight` changed default value of parameter *refPoint* from :py:data:`comet.kRefPointCenter` to :py:data:`comet.kRefPointTopLeft`. .. container:: priint-block **R32286** .. container:: priint-block-green :priint-green:`Compatible changes` - |indd_small| |comet-pdf_small| :py:func:`.comet.runCScript` now supports :py:class:`.CIDType` and :py:class:`list` [:py:class:`.CIDType`] as input - |indd_small| |comet-pdf_small| :py:func:`.comet.runCScript` now supports :py:class:`.CProduct` and :py:class:`list` [:py:class:`.CProduct`] as input - |indd_small| |comet-pdf_small| :py:func:`.comet.setScriptClipboard` now supports :py:class:`.CIDType` and :py:class:`list` [:py:class:`.CIDType`] - |indd_small| |comet-pdf_small| :py:func:`.comet.setScriptClipboard` now supports :py:class:`.CProduct` and :py:class:`list` [:py:class:`.CProduct`] - :py:meth:`.CTextModel.setLeading` can now enable or disable automatic leading using the *value* parameter - :py:func:`.comet.setScriptClipboard` now has a parameter to automatically delete entries once no more scripts are on the stack - **New functions**: - |indd_small| |comet-pdf_small| :py:meth:`.CTable.getFrame` - |illu_small| :py:meth:`.CSwatch.redefine` - :py:meth:`.CPageItem.getFillColor` - :py:meth:`.CPageItem.setFillColor` - **Fixes**: - |indd_small| :py:meth:`.CSwatch.redefine` crashes when called more than once of the same swatch. .. container:: priint-block-important :priint-red:`Incompatible changes` - :py:meth:`.CSwatch.redefine` parameter *colors* renamed to *color* - :py:meth:`.CSwatch.redefine` parameter *space* has been removed - the space is now derived from the *color* parameter. .. container:: priint-block **R32141** .. container:: priint-block-green :priint-green:`Compatible changes` - **New functions**: - |illu_small| :py:meth:`.CPageItem.getScale` - |illu_small| :py:meth:`.CPageItem.setScale` - |illu_small| :py:meth:`.CTextModel.getHorizontalJustification` - |illu_small| :py:meth:`.CTextModel.setHorizontalJustification` - **New constants**: - :ref:`comet.HorizontalJustification` - **The following functions have been moved from** :py:class:`.CFrame` **to** :py:class:`.CPageItem` **(should not interfere with usage)**: * :py:meth:`.CPageItem.moveTo` - **Fixes**: - |illu_small| :py:func:`.frame.createImageFrame` does not evaluate *dimensions* parameter. - |illu_small| :py:func:`.product.get` does not work when using 'selected' as the statement. - :py:func:`.comet.pyImport` sometimes fails with :py:class:`ModuleNotFoundError` even though the module is there. - :py:meth:`.CPageItem.setScale` parameter *refPoint* is not considered a default parameter. .. container:: priint-block **R32064** .. container:: priint-block-green :priint-green:`Compatible changes` - :py:class:`.CometError` now inherits :py:class:`Exception` instead of :py:class:`BaseException`, making it easier to catch - **New situations** (see :ref:`Availability`): - Stamp action: :ref:`ENV-kContextStampAction` - Excel Query function script: :ref:`ENV-kContextExcelQueryFunction` - **Fixes**: - :py:func:`comet.runCScript` crashes when parameter *items* is default. - |illu_small| :py:meth:`.CDocument.createPages` returns invalid objects after successful execution. - |illu_small| :py:meth:`.CFrame.duplicate` puts the result at inverted Y-coordinates **for compound paths** - |illu_small| :py:meth:`.CFrame.duplicate` does not properly place subpaths **for compound paths** - |illu_small| After calls to :py:meth:`.CPage.setPosition`, the page object is left in an invalid state. - |illu_small| Situation :ref:`ENV-kContextLayoutRule` is missing pubserver environment variables. - |illu_small| Situation :ref:`ENV-kContextLayoutRuleCondition` is missing pubserver environment variables. - |illu_small| Situation :ref:`ENV-kContextLayoutRuleDynamicList` is missing pubserver environment variables. - |illu_small| Situation :ref:`ENV-kContextDoubleClickProductPool` is missing pubserver environment variables. .. container:: priint-block **R31940** .. container:: priint-block-green :priint-green:`Compatible changes` - |illu_small| :py:meth:`.CDocument.saveAs` and :py:meth:`.CDocument.saveAsCopy` now have an additional *options* parameter to configure saving options - :py:meth:`.CFrame.duplicate` now accepts :py:data:`None` for the *x* and *y* parameters, using the source coordinates if given - **Fixes**: - |indd_small| |comet-pdf_small| situation :ref:`ENV-kContextAfterLogin` was not working for XML offline datapools - |illu_small| :py:meth:`.CFrame.duplicate` puts the result at inverted Y-coordinates .. container:: priint-block **R31859** .. container:: priint-block-green :priint-green:`Compatible changes` - :py:meth:`.CDocument.getPage` now also accepts :py:class:`.str` as the *data* parameter to search for a page by name - :py:func:`.frame.getBBox` now accepts :py:class:`list` [:py:class:`.CPageItem`] as input - :py:func:`.frame.getSelected` now returns :py:class:`list` [:py:class:`.CPageItem`] instead of :py:class:`list` [:py:class:`.CFrame`] - :py:func:`.frame.createTextFrame` now accepts coordinates directly as a tuple for the *dimensions* parameter - :py:func:`.frame.createTextFrame` now accepts [:py:class:`.CLayer`] and :py:class:`list` [:py:class:`str`] and :py:class:`int` for the target layer - :py:func:`.frame.createTextFrame` now accepts [:py:class:`.CPage`] for the target page - :py:meth:`.CPageItem.setLayer` can now use nested layers as the target *layer* - :py:meth:`.CDocument.getLayer` can now search for nested layers and for layers by index - **New functions**: - :py:meth:`.CTextModel.getTracking` - :py:meth:`.CTextModel.setTracking` - :py:meth:`.CTextModel.getLeading` - :py:meth:`.CTextModel.setLeading` - :py:meth:`.CLayer.getItems` - :py:meth:`.CPage.getBounds` - :py:meth:`.CPage.getPosition` - :py:meth:`.CPage.setPosition` - :py:func:`.comet.isAltKeyPressed` - :py:func:`.comet.isCtrlKeyPressed` - :py:func:`.comet.isShiftKeyPressed` - :py:func:`.comet.showError` - :py:func:`.frame.createImageFrame` - **Fixes**: - :py:func:`.frame.createTextFrame` *page* parameter is not properly interpreted - :py:meth:`.CometError.getAdditionalInfo` raises when no additional information is available - :py:meth:`.CTable.getRowCount` parameter *rowType* does not have a default value - :py:meth:`.CTable.setStroke` does not work when operating on entire columns or rows - :py:meth:`.CPageItem.getType` was not implemented - :py:meth:`.CPageItem.setLayer` fails when the *layer* parameter is a nested :py:class:`.CLayer` - :py:meth:`.CDocument.exportPDF` does an undo after saving the document - |illu_small| :py:meth:`.CDocument.exportPDF` does not evaluate the *indices* parameter .. container:: priint-block-important :priint-red:`Incompatible changes` - :py:func:`.frame.createTextFrame` parameter order changed - :py:func:`.frame.getBBox` parameter *frames* has been renamed to *items* - :py:meth:`.CDocument.getLayer` parameter *name* has been renamed to *data* .. container:: priint-block **R31755** **No changes** .. container:: priint-block **R31701** .. container:: priint-block-green :priint-green:`Compatible changes` - :py:func:`.product.establish` now additionally accepts a page index for the *page* parameter - :py:func:`.comet.pyImport` can now handle all imports like CScript - :py:meth:`.CTable.setCellFill` now also accepts :py:class:`.CColor` as the *data* parameter - **New modules**: - :py:mod:`.xmltree` - **New classes**: - :py:class:`.CXMLNode` - :py:class:`.CXMLTree` - **New functions**: - :py:func:`.prefs.getLogState` - :py:func:`.prefs.setLogState` - :py:func:`.product.getEstablished` - :py:meth:`.CPage.createSnapshot` - :py:meth:`.CBook.getDocumentPageRange` - :py:meth:`.CTable.cellHasOverset` - :py:meth:`.CXMLNode.getName` - :py:meth:`.CXMLNode.getType` - :py:meth:`.CXMLNode.getPath` - :py:meth:`.CXMLNode.getContent` - :py:meth:`.CXMLNode.getChildren` - :py:meth:`.CXMLNode.isAttribute` - :py:meth:`.CXMLTree.getRoot` - :py:meth:`.CXMLTree.send` - :py:meth:`.CXMLTree.sendCDataBegin` - :py:meth:`.CXMLTree.sendCDataEnd` - :py:meth:`.CXMLTree.input` - :py:meth:`.CXMLTree.output` - :py:meth:`.CXMLTree.execute` - :py:meth:`.CXMLTree.fetch` - :py:meth:`.CXMLTree.serialize` - **Fixes**: - Error messages of exceptions do not get output to the logfile when custom logging (*log.xml*) is enabled - :py:func:`.product.establish` does not accept :py:class:`.CPage` as the *page* parameter - :py:func:`.link.insertTocEntry` crashes when parameter *options* is not given - :py:func:`comet.pyImport` does not always raise an ImportError when the import failed - :py:func:`.hyperlink.create` raises CometError on creation of text hyperlinks - :py:func:`.placeholder.load` only works properly when parameter *recordIDs* is not empty - :py:func:`.rect.create` parameters *top* and *right* are reversed - :py:func:`.hyperlink.findCrossRefs` parameter *calcTextCoords* does not work - :py:meth:`.CCrossRef.getPageIndex` parameter *fromBook* is not default - :py:meth:`.CCrossRef.getPageName` parameter *fromBook* is not default - :py:meth:`.CBook.setDocumentPosition` does not raise KeyError when the document is not found - :py:meth:`.CBook.setMasterDocument` does not raise KeyError when the document is not found - :py:meth:`.CBook.removeDocument` does not raise KeyError when the document is not found - :py:meth:`.CBook.removeDocument` reports wrong function name on error - :py:meth:`.CTable.setCellFill` raises TypeError when the *data* parameter is a tuple - |illu_small| :py:meth:`.CTable.getCellType` always raises CometError - |illu_small| :py:meth:`.CTable.remove` always raises CometError - |illu_small| :py:meth:`.CTable.getCellStyle` always raises CometError - |illu_small| :py:meth:`.CTable.setCellStyle` always raises CometError - |illu_small| :py:meth:`.CTable.getCellInsets` always raises CometError - |illu_small| :py:meth:`.CTable.setCellInsets` always raises CometError - |illu_small| :py:meth:`.CTable.getCellFrame` always raises CometError - |illu_small| :py:meth:`.CTable.getCellBox` always raises CometError - |illu_small| :py:meth:`.CTable.getCellSize` always raises CometError - |illu_small| :py:meth:`.CTable.getCellText` always raises CometError - |illu_small| :py:meth:`.CTable.setStroke` always raises CometError - |illu_small| :py:meth:`.CTable.setCellFill` always raises CometError - |illu_small| :py:meth:`.CTable.setCellText` always raises CometError - |illu_small| :py:meth:`.CTable.mergeCells` always raises CometError - |illu_small| :py:meth:`.CTable.getStyle` always raises CometError - |illu_small| :py:meth:`.CTable.setStyle` always raises CometError - |illu_small| :py:meth:`.CTable.getColumnWidth` always raises CometError - |illu_small| :py:meth:`.CTable.getColumnWidth` always raises CometError - |illu_small| :py:meth:`.CTable.getRowHeight` always raises CometError - |illu_small| :py:meth:`.CTable.setRowHeight` always raises CometError - |illu_small| :py:meth:`.CTable.insertColumns` always raises CometError - |illu_small| :py:meth:`.CTable.removeColumns` always raises CometError - |illu_small| :py:meth:`.CTable.getColumnCount` always raises CometError - |illu_small| :py:meth:`.CTable.insertRows` always raises CometError - |illu_small| :py:meth:`.CTable.removeRows` always raises CometError - |illu_small| :py:meth:`.CTable.getRowCount` always raises CometError - |illu_small| :py:meth:`.CTable.getFrame` always raises CometError .. container:: priint-block-important :priint-red:`Incompatible changes` - :py:func:`.comet.runCScript` *items* parameter completely reworked to support a wide range of Python types in CScript - :py:meth:`.CFrame.getTemplate` now has an additional parameter whether to determine the template name - :py:meth:`.CPage.snapshot` has been removed - :py:meth:`.CFrame.getHasOverset` is now :py:meth:`.CFrame.hasOverset` - :py:func:`comet.pyImport` now always requires a file extension when trying to import a file .. container:: priint-block **R31400** .. container:: priint-block-green :priint-green:`Compatible changes` - **Fixes**: * :py:meth:`.CPageItem.getOpacity` always raises an error in InDesign® .. container:: priint-block **R31313** .. container:: priint-block-green :priint-green:`Compatible changes` - **Fixes**: * The following functions always raise an exception stating the textmodel could not be found: * :py:meth:`.CFrame.getTextModel` * :py:meth:`.CFrame.getColumnGutter` * :py:meth:`.CFrame.setColumnGutter` * :py:meth:`.CFrame.getText` * :py:meth:`.CFrame.setText` * :py:meth:`.CFrame.getColumnCount` .. container:: priint-block **R31147** .. container:: priint-block-green :priint-green:`Compatible changes` - **Fixes**: * Fixed an issue on Mac systems where sometimes int parameters would not be properly filled .. container:: priint-block **R30871** .. container:: priint-block-green :priint-green:`Compatible changes` - **New situations** (see :ref:`Availability`): - app.comet.eval (Call from Javascript): :ref:`ENV-kContextServerInterface` - URLLink header data: :ref:`ENV-kContextURLLinkHeaderData` - **New functions**: * :py:func:`.datapool.getSessionID` * :py:func:`.frame.createGroup` * :py:meth:`.CFrame.applyLayoutRules` * :py:meth:`.CFrame.getPageElement` * :py:meth:`.CFrame.getTemplate` * :py:meth:`.CometError.__str__` * :py:meth:`.CometError.getAdditionalInfo` * :py:meth:`.CPage.getInfo` * :py:meth:`.CPage.setInfo` * :py:meth:`.CPage.getPageItems` * :py:meth:`.CPageItem.removeScriptTags` - **New constants**: - :ref:`comet.PageInfo` - The following functions have been moved from :py:class:`.CFrame` to :py:class:`.CPageItem` (should not interfere with usage): * :py:meth:`.CPageItem.getBBox` * :py:meth:`.CPageItem.getScale` * :py:meth:`.CPageItem.setScale` * :py:meth:`.CPageItem.getRotation` * :py:meth:`.CPageItem.setRotation` * :py:meth:`.CPageItem.getSkew` * :py:meth:`.CPageItem.setSkew` * :py:meth:`.CPageItem.getPrintable` * :py:meth:`.CPageItem.setPrintable` * :py:meth:`.CPageItem.getOverprint` * :py:meth:`.CPageItem.setOverprint` * :py:meth:`.CPageItem.getObjectStyle` * :py:meth:`.CPageItem.setObjectStyle` * :py:meth:`.CPageItem.getScriptTag` * :py:meth:`.CPageItem.getScriptTags` * :py:meth:`.CPageItem.setScriptTag` - **Fixes**: * Text layout rules cause a crash on execution * :py:func:`.hyperlink.findCrossRefs` is not working * :py:meth:`.CDocument.getPage` parameter *data* is evaluated wrongly * :py:meth:`.CPage.getFrames` yields frames of entire spread and sometimes nothing .. container:: priint-block-important :priint-red:`Incompatible changes` - The function :py:meth:`.CFrame.getIsInFront` is now :py:meth:`.CFrame.isInFront` - The function :py:meth:`.CFrame.getIsInBack` is now :py:meth:`.CFrame.isInBack` - The function :py:meth:`.CSwatch.getIsSpot` is now :py:meth:`.CSwatch.isSpot` - The function :py:meth:`.CSwatch.getIsLocked` is now :py:meth:`.CSwatch.isLocked` - The function :py:meth:`.CSwatch.getIsReserved` is now :py:meth:`.CSwatch.isReserved` .. container:: priint-block **R30779** .. container:: priint-block-green :priint-green:`Compatible changes` - **New classes**: - :py:class:`.CGroup` - :py:class:`.CPageItem` - **New functions**: - :py:func:`.comet.getScriptClipboard` - :py:func:`.comet.setScriptClipboard` - :py:func:`.comet.clearScriptClipboard` - :py:func:`.frame.getSelected` - :py:func:`.html.toTagged` - :py:func:`.html.exportText` - :py:func:`.link.insertTocEntry` - :py:func:`.link.deleteTocEntry` - :py:func:`.publication.getProductPlanning` - :py:meth:`.CBook.exportPDF` - :py:meth:`.CFrame.getNail` - :py:meth:`.CFrame.setNail` - :py:meth:`.CFrame.applyMagnets` - :py:meth:`.CGroup.getMembers` - :py:meth:`.CGroup.addMembers` - :py:meth:`.CGroup.removeMembers` - :py:meth:`.CGroup.getGroup` - :py:meth:`.CGroup.resolve` - :py:meth:`.CDocument.getGroups` - :py:meth:`.CDocument.getPageItems` - :py:meth:`.CDocument.setStartPage` - :py:meth:`.CDocument.saveAsCopy` - :py:meth:`.CLink.getPrefix` - :py:meth:`.CLink.getPrefixIfEmpty` - :py:meth:`.CLink.getPostfix` - :py:meth:`.CLink.getPostfixIfEmpty` - **Other new things**: - The documentation stubs (found in *PyDoc/comet*) now more accurately reflect the actual class and module structure of comet. All classes are now properly members of the *comet* module instead of a seperate module per class. - :py:class:`.CFrame` now inherits :py:class:`.CPageItem` The following functions have been moved from :py:class:`.CFrame` to :py:class:`.CPageItem` (should not interfere with usage): * :py:meth:`.CPageItem.getUID` * :py:meth:`.CPageItem.getType` * :py:meth:`.CPageItem.getDocument` * :py:meth:`.CPageItem.getPage` * :py:meth:`.CPageItem.getLayer` * :py:meth:`.CPageItem.setLayer` * :py:meth:`.CPageItem.getGroup` * :py:meth:`.CPageItem.getName` * :py:meth:`.CPageItem.setName` * :py:meth:`.CPageItem.getLocked` * :py:meth:`.CPageItem.setLocked` * :py:meth:`.CPageItem.getVisible` * :py:meth:`.CPageItem.setVisible` * :py:meth:`.CPageItem.remove` - :ref:`comet.Designate` constants - :ref:`comet.PageItemTypes` new value :py:data:`comet.kPageItemTypeGuide` (used with :py:meth:`.CPageItem.getType`) - :ref:`comet.PageItemTypes` new value :py:data:`comet.kPageItemTypeQRCode` (used with :py:meth:`.CPageItem.getType`) - :py:func:`.product.establish` provides a more verbose error message when parameter *products* is empty list - :py:meth:`.CDocument.exportPDF` now accepts an empty *path* parameter, putting the result PDF next to the document - :py:meth:`.CDocument.exportPDF` now respects the *scope* parameter - :py:meth:`.CDocument.exportPDF` now respects the *indices* parameter - :py:meth:`.CDocument.exportPDF` now accepts a :py:class:`dict` as the profile parameter containing interactive PDF options - **Fixes**: - :py:meth:`.CDocument.exportPDF` always crashes - :py:meth:`.CTable.getCellSize`, :py:meth:`.CTable.getCellTextPosition`, :py:meth:`.CTable.getCellBox`, :py:meth:`.CTable.getCellFrame`, :py:meth:`.CTable.getCellInsets`, and :py:meth:`.CTable.getCellStyle` don't accept out of bounds indices even though they should - :py:func:`.product.establish` parameter *layer* does not work when explicitly providing :py:data:`None` as value .. container:: priint-block-important :priint-red:`Incompatible changes` - **Other changes**: - **comet.FrameTypes** is now :ref:`comet.PageItemTypes` - :py:meth:`.CFrame.hasOverset` is now :py:meth:`.CFrame.getHasOverset` - :py:meth:`.CFrame.isInline` is now :py:meth:`.CFrame.getIsInline` - :py:meth:`.CDocument.getCellSize` parameter *insetRelative* renamed to *areaType*, type changed from :py:class:`bool` to :py:class:`int` - :py:meth:`.CDocument.getCellBox` parameter *relativeTo* renamed to *areaType*, valid value range changed - :py:meth:`print` is no longer redirected to the comet logfile since that causes crashes on M1 Macs .. container:: priint-block **R30683** .. container:: priint-block-green :priint-green:`Compatible changes` - Python version has been upgraded to 3.10 - **New classes**: - :py:class:`.CBookmark` - :py:class:`.CColor` - :py:class:`.CCrossRef` - **New functions**: - :py:func:`.color.createGray` - :py:func:`.color.createRGB` - :py:func:`.color.createCMYK` - :py:func:`.color.createLAB` - :py:func:`.hyperlink.findCrossRefs` - :py:meth:`.CBookmark.isValid` - :py:meth:`.CBookmark.getDocument` - :py:meth:`.CBookmark.getName` - :py:meth:`.CBookmark.setName` - :py:meth:`.CBookmark.getDepth` - :py:meth:`.CBookmark.getIndex` - :py:meth:`.CBookmark.setIndex` - :py:meth:`.CBookmark.getParent` - :py:meth:`.CBookmark.setParent` - :py:meth:`.CBookmark.getChildren` - :py:meth:`.CBookmark.setColor` - :py:meth:`.CBookmark.createBookmark` - :py:meth:`.CBookmark.remove` - :py:meth:`.CColor.getModel` - :py:meth:`.CColor.getValues` - :py:meth:`.CColor.setGray` - :py:meth:`.CColor.setRGB` - :py:meth:`.CColor.setCMYK` - :py:meth:`.CColor.setLAB` - :py:meth:`.CCrossRef.getName` - :py:meth:`.CCrossRef.getDocumentName` - :py:meth:`.CCrossRef.getDocumentPath` - :py:meth:`.CCrossRef.getPageIndex` - :py:meth:`.CCrossRef.getPageName` - :py:meth:`.CCrossRef.getDestination` - :py:meth:`.CCrossRef.getPosition` - :py:meth:`.CCrossRef.getFrameBBox` - :py:meth:`.CCrossRef.getIndex` - :py:meth:`.CCrossRef.getFrame` - :py:meth:`.CDocument.getBook` - :py:meth:`.CDocument.getFrame` - :py:meth:`.CDocument.getSwatch` - :py:meth:`.CDocument.getSwatches` - :py:meth:`.CDocument.createSwatchRGB` - :py:meth:`.CDocument.createSwatchCMYK` - :py:meth:`.CDocument.createSwatchLAB` - :py:meth:`.CDocument.getBookmarks` - :py:meth:`.CDocument.createBookmark` - :py:meth:`.CDocument.createPages` - :py:meth:`.CSwatch.getModel` - :py:meth:`.CSwatch.getColor` - :py:meth:`.CTextModel.insertCrossRef` - **Other new things**: - :py:meth:`.CTextModel.setColor` now also accepts :py:class:`.CColor` for the *color* parameter - :py:meth:`.CHyperlink.setColor` now also accepts :py:class:`.CColor` for the *color* parameter - :ref:`comet.ColorModels` constants - :ref:`comet.SwatchSpaces` constants - **Fixes**: - Several memory leaks - |indd| :py:func:`.document.open` always raises a CometError .. container:: priint-block-important :priint-red:`Incompatible changes` - **Removals**: - **comet.DocColorModels** constants (replaced by :ref:`comet.ColorModels`) - **comet.ColorTypes** constants (replaced by :ref:`comet.SwatchSpaces`) - :py:mod:`.page` module removed - was not functional - :py:func:`.frame.find` (replaced by :py:meth:`.CDocument.getFrame`) - :py:func:`.color.getSwatch` (replaced by :py:meth:`.CDocument.getSwatch`) - :py:func:`.color.getSwatches` (replaced by :py:meth:`.CDocument.getSwatches`) - :py:func:`.color.createSwatchRGB` (replaced by :py:meth:`.CDocument.createSwatchRGB`) - :py:func:`.color.createSwatchCMYK` (replaced by :py:meth:`.CDocument.createSwatchCMYK`) - :py:func:`.color.createSwatchLAB` (replaced by :py:meth:`.CDocument.createSwatchLAB`) - **Other changes**: - All Python scripts **must** now start with the *#!py* directive at beginning of the script. Before, this directive could be anywhere in the script. See here: :ref:`INTR-HelloWorld` - :py:mod:`.color` : Several functions now have uppercase parameter names for the color values - :py:meth:`.CExcelBook.getFontColor` now returns :py:class:`.CColor` instead of color values tuple - :py:meth:`.CExcelBook.getColor` now returns :py:class:`.CColor` instead of color values tuple - :py:meth:`.CTextModel.getColor` now returns :py:class:`.CColor` instead of color values tuple - :py:meth:`.CTextModel.getColor` no longer returns color model individually - it is contained in the result :py:class:`.CColor` - :py:meth:`.CDocument.addLayer` renamed to :py:meth:`.CDocument.createLayer` .. container:: priint-block **R30603** :priint-green:`Compatible changes` - **New classes**: - :py:class:`.CCometGroup` - **New functions**: - |illu| :py:func:`.color.createSwatchRGB` - |illu| :py:func:`.color.createSwatchCMYK` - :py:func:`.hyperlink.find` - :py:func:`.prefs.getSnippetMatch` - :py:func:`.prefs.setSnippetMatch` - :py:meth:`.CBook.getDocuments` - :py:meth:`.CCometGroup.getDocument` - :py:meth:`.CCometGroup.getID` - :py:meth:`.CCometGroup.getMembers` - :py:meth:`.CCometGroup.addMembers` - :py:meth:`.CCometGroup.removeMembers` - :py:meth:`.CCometGroup.remove` - :py:meth:`.CDocument.getCometGroup` - :py:meth:`.CDocument.getPage` - :py:meth:`.CDocument.getLayer` - :py:meth:`.CFrame.getChainFrames` - :py:meth:`.CFrame.getCometGroup` - :py:meth:`.CLayer.getPath` - :py:meth:`.CLayer.getParent` - :py:meth:`.CLayer.setParent` - :py:meth:`.CLayer.getChildren` - :py:meth:`.CLayer.getSiblings` - |illu| :py:meth:`.CSwatch.getDocument` - |illu| :py:meth:`.CSwatch.getName` - :py:meth:`.CTextModel.getInlines` - **Other new things**: - New environment variables *gDocumentPathPDF* and *gBeforeMetaData* in :py:ref:`ENV-kContextDocWatch` - Constants :py:ref:`comet.SnippetMatchSettings` - New parameter for :py:func:`.prefs.getURLLinkTimeout` and :py:func:`.prefs.setURLLinkTimeout` which determines the type of timeout - **Fixes**: - |illu| :py:class:`.CPage` objects pointing to the same page should now properly update on changes :priint-red:`Incompatible changes` - **Removals** - :py:func:`.frame.resolveCometGroup` - :py:func:`.frame.getCometGroupMembers` - **Other changes** - :py:meth:`.CTable.colorize` is now named :py:meth:`.CTable.setCellFill` - :py:meth:`.CTable.setCellFill` parameters refactored - :py:meth:`.frame.define` is now named :py:func:`.frame.find` - :py:meth:`.CDocument.getFrames` parameters fully refactored .. container:: priint-block **R30464** :priint-green:`Compatible changes` - **New modules**: - :py:mod:`.book` - :py:mod:`.hyperlink` - **New classes**: - :py:class:`.CBook` - :py:class:`.CHyperlink` - :py:class:`.CHyperlinkSource` - :py:class:`.CHyperlinkDestination` - **New functions**: - :py:func:`.frame.define` - :py:func:`.book.create` - :py:func:`.book.open` - :py:func:`.book.getOpen` - :py:func:`.book.getByPath` - :py:func:`.book.getCurrent` - :py:func:`.hyperlink.createPageDestination` - :py:func:`.hyperlink.createTextDestination` - :py:func:`.hyperlink.createURLDestination` - :py:func:`.hyperlink.create` - :py:func:`.hyperlink.getNextUniqueKey` - :py:meth:`.CBook.isValid` - :py:meth:`.CBook.getPath` - :py:meth:`.CBook.save` - :py:meth:`.CBook.close` - :py:meth:`.CBook.setCurrent` - :py:meth:`.CBook.insertDocument` - :py:meth:`.CBook.removeDocument` - :py:meth:`.CBook.getDocumentPosition` - :py:meth:`.CBook.setDocumentPosition` - :py:meth:`.CBook.getMasterDocument` - :py:meth:`.CBook.setMasterDocument` - :py:meth:`.CBook.repaginate` - :py:meth:`.CLayer.getFrames` - :py:meth:`.CHyperlink.isValid` - :py:meth:`.CHyperlink.getType` - :py:meth:`.CHyperlink.getDocument` - :py:meth:`.CHyperlink.getSource` - :py:meth:`.CHyperlink.getDestination` - :py:meth:`.CHyperlink.getName` - :py:meth:`.CHyperlink.setName` - :py:meth:`.CHyperlink.getVisible` - :py:meth:`.CHyperlink.setVisible` - :py:meth:`.CHyperlink.getColor` - :py:meth:`.CHyperlink.setColor` - :py:meth:`.CHyperlink.getBorderWidth` - :py:meth:`.CHyperlink.setBorderWidth` - :py:meth:`.CHyperlink.getHilight` - :py:meth:`.CHyperlink.setHilight` - :py:meth:`.CHyperlink.getOutlineStyle` - :py:meth:`.CHyperlink.setOutlineStyle` - :py:meth:`.CHyperlink.remove` - :py:meth:`.CHyperlinkSource.isValid` - :py:meth:`.CHyperlinkSource.getDocument` - :py:meth:`.CHyperlinkSource.getType` - :py:meth:`.CHyperlinkSource.getFrame` - :py:meth:`.CHyperlinkSource.getTextModel` - :py:meth:`.CHyperlinkSource.getStart` - :py:meth:`.CHyperlinkSource.getLength` - :py:meth:`.CHyperlinkSource.getLink` - :py:meth:`.CHyperlinkDestination.isValid` - :py:meth:`.CHyperlinkDestination.getDocument` - :py:meth:`.CHyperlinkDestination.getType` - :py:meth:`.CHyperlinkDestination.getPageIndex` - :py:meth:`.CHyperlinkDestination.getURL` - :py:meth:`.CHyperlinkDestination.getTextAnchor` - :py:meth:`.CTextModel.setColor` - :py:meth:`.CTextModel.getColor` - **Other new things**: - :py:meth:`.CPage.setSize` new default parameter 'refPoint' - :py:meth:`.CRect.adjust` new default parameter 'refPoint' - :py:meth:`.CRect.setHeight` new default parameter 'refPoint' - :py:meth:`.CRect.setWidth` new default parameter 'refPoint' - :py:meth:`.CRect.moveTo` new default parameter 'refPoint' :priint-red:`Incompatible changes` - **Other new things** - :py:meth:`.CTextModel.setFontSize` parameter order changed - :py:meth:`.CTextModel.setFont` parameter order changed - :py:meth:`.CTextModel.setColor` parameter order changed - :py:meth:`.CTextModel.setParaStyle` parameter order changed - :py:meth:`.CTextModel.setCharStyle` parameter order changed - :py:meth:`.CTextModel.getParaStyle` result tuple value order changed - :py:meth:`.CTextModel.getCharStyle` result tuple value order changed - :py:meth:`.CTextModel.getFontSize` returns tuple instead of float .. container:: priint-block **R30323** |br| |br| :priint-green:`Compatible changes` |br| - **New situations** (see :ref:`Availability`): - Page template after apply - **New modules**: - :py:mod:`.logger` for advanced logfile writing - :py:mod:`.color` for access to document colors and swatches - **New classes**: - :py:class:`.CSwatch` - **New functions**: - :py:func:`.logger.log` - :py:func:`.logger.error` - :py:func:`.logger.warning` - :py:func:`.logger.info` - :py:func:`.logger.debug` - :py:func:`.logger.trace` - :py:func:`.logger.getPattern` - :py:func:`.logger.setPattern` - :py:func:`.logger.getEscaping` - :py:func:`.logger.setEscaping` - :py:func:`.logger.getPath` - :py:func:`.logger.setPath` - :py:func:`.logger.getLevel` - :py:func:`.logger.setLevel` - :py:func:`.logger.reloadConfig` - :py:func:`.color.createSwatchRGB` - :py:func:`.color.createSwatchCMYK` - :py:func:`.color.createSwatchLAB` - :py:func:`.color.getSwatch` - :py:func:`.color.getSwatches` - :py:func:`.product.getBuildTrace` - :py:func:`.product.setBuildTrace` - :py:meth:`.CDocument.getAttributes` - :py:meth:`.CSwatch.getDocument` - :py:meth:`.CSwatch.getName` - :py:meth:`.CSwatch.getSpace` - :py:meth:`.CSwatch.getType` - :py:meth:`.CSwatch.getTint` - :py:meth:`.CSwatch.getIsSpot` - :py:meth:`.CSwatch.getIsLocked` - :py:meth:`.CSwatch.getIsReserved` - :py:meth:`.CSwatch.getColors` - :py:meth:`.CSwatch.redefine` - :py:meth:`.CTable.setCellInsets` - :py:meth:`.CTable.getCellType` - :py:meth:`.CFrame.getOverprint` - :py:meth:`.CFrame.setOverprint` - :py:meth:`.CFrame.setName` - :py:meth:`.CFrame.getScale` - :py:meth:`.CFrame.setScale` - :py:meth:`.CFrame.getSkew` - :py:meth:`.CFrame.setSkew` - :py:meth:`.CFrame.setPrintable` - :py:meth:`.CFrame.getPrintable` - :py:meth:`.CFrame.getColumnCount` - :py:meth:`.CFrame.setColumnCount` - :py:meth:`.CFrame.getColumnGutter` - :py:meth:`.CFrame.setColumnGutter` - :py:meth:`.CFrame.getImageSkew` - :py:meth:`.CFrame.setImageSkew` - **Other new things**: - Context :py:data:`comet.kContextPageTemplateAfterApply` - Constants :py:ref:`comet.SwatchTypes` - Constants **comet.ColorTypes** - Constants :py:ref:`comet.Overprintsettings` - :ref:`comet.Sides` value :py:data:`comet.kSideAll` :priint-red:`Incompatible changes` |br| - :py:meth:`.CDocument.hasAttribute` removed for now. May be reintroduced later. - :py:meth:`.CExcelBook.getCellFormat` now returns tuple instead of list - :py:meth:`.CTable.setText` is now named :py:meth:`.CTable.setCellText` .. container:: priint-block **R30121** |br| |br| :priint-green:`Compatible changes` |br| - **New situations** (see :ref:`Availability`): - Product build: Prescript - Previews panel entries - **New functions**: - :py:func:`.product.create` - :py:meth:`.CFrame.duplicate` - :py:meth:`.CProduct.setAttribute` - **Other new things**: - New context :py:data:`comet.kContextProductBuildPre` - New context :py:data:`comet.kContextPreviewsEntries` - New context :py:data:`comet.kContextPreviewsLink` - Environment variable *gProducts* is now available for :py:ref:`ENV-kContextProductBuildPre` .. container:: priint-block **R30009** |br| |br| :priint-green:`Compatible changes` |br| - **New situations** (see :ref:`Availability`): - Table Module: Insert rows - Table Module: Insert columns - Table module: Layout rules - Table Module: Cell ID - ToDoList: Custom tasks - Placeholder sync: String comparison - Product pool: Default search field value - **New functions**: - Added :py:func:`.product.establish` - Added :py:func:`.prefs.getMagnetState` - Added :py:func:`.prefs.setMagnetState` - Added :py:func:`.prefs.getLayoutRulesState` - Added :py:func:`.prefs.setLayoutRulesState` - Added :py:func:`.prefs.getLayoutRuleState` - Added :py:func:`.prefs.setLayoutRuleState` - **Other new things**: - Added new context :py:data:`comet.kContextTableModuleInsertRow` - Added new context :py:data:`comet.kContextTableModuleInsertColumn` - Added new context :py:data:`comet.kContextTableModuleLayoutRule` - Added new context :py:data:`comet.kContextTableModuleCellID` - Added new context :py:data:`comet.kContextToDoListCustomTask` - Added new context :py:data:`comet.kContextPlaceHolderStringCompare` - Added new context :py:data:`comet.kContextProductPoolSFDefaultValue` - Added :py:ref:`comet.MagnetSituations` constants and dictionary - Added :py:ref:`comet.MagnetStates` constants and dictionary .. container:: priint-block **R29607** |br| |br| :priint-green:`Compatible changes` |br| - Several modules and their static functions have been reinstituted - **New modules**: - Added :py:mod:`.host` module for querying the host environment the priint:comet Python API is running in - Added :py:func:`.host.getType` - Added :py:func:`.host.getVersion` - Added :py:func:`.host.getIsServer` - Added :py:func:`.host.getLanguage` - Added :py:func:`.host.getApplicationPath` - Added :py:func:`.host.getPluginPath` - Added :py:func:`.host.getPDFProfileNames` - Added :py:func:`.host.exportPDFProfiles` - Added :py:func:`.host.importPDFProfiles` - Added :py:func:`.host.getPrintProfileNames` - Added :py:func:`.host.exportPrintProfiles` - Added :py:func:`.host.importPrintProfiles` - Added :py:func:`.host.getFlattenerProfileNames` - Added :py:func:`.host.exportFlattenerProfiles` - Added :py:func:`.host.importFlattenerProfiles` - **New functions**: - Added :py:func:`.comet.getVersion` - Added :py:func:`.comet.getRevision` - Added :py:func:`.page.create` - Added :py:func:`.placeholder.loadServer` - Added :py:meth:`.CTextModel.replace` - **Other new things**: - Added :py:ref:`comet.ExcelCellTypes` constants and dictionary - Added :py:ref:`comet.ExcelSelectors` constants and dictionary - Added :py:ref:`comet.ExcelBorderStyles` constants and dictionary - Added :py:ref:`comet.ExcelUnderlineStyles` constants and dictionary - Added :py:ref:`comet.ExcelFontPosition` constants and dictionary :priint-red:`Incompatible changes` |br| - Removed all constants from :py:mod:`.excel` module and moved them to :py:mod:`.comet` module - Removed :py:func:`.comet.getHost` (moved to :py:func:`.host.getType`) - Removed :py:mod:`.sync` module. Functionality can be achieved using :py:func:`.comet.setOutput` - Removed :py:mod:`.system` module (moved functions to :py:mod:`.comet` and :py:mod:`.host`): - Removed :py:func:`.system.getApplicationPath` - Removed :py:func:`.system.getPluginPath` - Removed :py:func:`.system.getRevision` - Removed :py:func:`.system.getCometVersion` - Static functions in classes have been removed again and moved to their appropriate modules - Moved :py:meth:`.comet.selectFile` to :py:func:`.dialog.selectFile` - Moved :py:meth:`.comet.selectFolder` to :py:func:`.dialog.selectFolder` .. container:: priint-block **R29546** |br| |br| :priint-green:`Compatible changes` |br| - Python can now be used in the following additional situations (see :ref:`Availability`): - Text layout rules - Text layout conditions - Panel actions: Previews - Panel actions: ToDo list - Comet notes: Target layer - Comet notes: Parastyle - Products of document: Special cases - **New functions**: - Added :py:func:`.comet.selectFolder` - Added :py:func:`.comet.getKeyValue` - Added :py:func:`.publication.toXMLStringList` - Added :py:func:`.publication.fromXMLStringList` - Added :py:func:`.publication.toXMLFloatList` - Added :py:func:`.publication.fromXMLFloatList` - Added :py:func:`.publication.toXMLIntList` - Added :py:func:`.publication.fromXMLIntList` - Added :py:func:`.publication.toXMLKeyValueList` - Added :py:func:`.publication.fromXMLKeyValueList` - Added :py:func:`.publication.toXMLElement` - Added :py:func:`.publication.fromXMLElement` - Added :py:func:`.publication.toXMLElementList` - Added :py:func:`.publication.fromXMLElementList` - Added :py:func:`.publication.toXMLIDType` - Added :py:func:`.publication.fromXMLIDType` - Added :py:func:`.publication.toXMLIDTypeList` - Added :py:func:`.publication.fromXMLIDTypeList` - Added :py:func:`.publication.toXMLParameter` - Added :py:func:`.publication.fromXMLParameter` - Added :py:func:`.publication.toXMLParameterList` - Added :py:func:`.publication.fromXMLParameterList` - Added :py:func:`.publication.toXMLPlanning` - Added :py:func:`.publication.fromXMLPlanning` - Added :py:func:`.publication.toXMLPlanningList` - Added :py:func:`.publication.fromXMLPlanningList` - Added :py:func:`.publication.toXMLProduct` - Added :py:func:`.publication.fromXMLProduct` - Added :py:func:`.publication.toXMLProductList` - Added :py:func:`.publication.fromXMLProductList` - Added :py:func:`.publication.toXMLPublication` - Added :py:func:`.publication.fromXMLPublication` - Added :py:func:`.publication.toXMLPublicationList` - Added :py:func:`.publication.fromXMLPublicationList` - Added :py:func:`.publication.toXMLPublicationType` - Added :py:func:`.publication.fromXMLPublicationType` - Added :py:func:`.publication.toXMLPublicationTypeList` - Added :py:func:`.publication.fromXMLPublicationTypeList` - Added :py:func:`.publication.toXMLWorkflowStatus` - Added :py:func:`.publication.fromXMLWorkflowStatus` - Added :py:func:`.publication.toXMLWorkflowStatusList` - Added :py:func:`.publication.fromXMLWorkflowStatusList` - Added :py:meth:`.CTable.create` - Added :py:meth:`.CTable.find` - **Other new things**: - Added :py:ref:`comet.BasicTypes` dictionary - Added :py:ref:`comet.Contexts` dictionary - Added :py:ref:`comet.Indices` dictionary - Added :py:ref:`comet.LineTypes` dictionary - Added :py:ref:`comet.RowTypes` dictionary - Added :py:ref:`comet.StrokeSelectors` dictionary - Added :py:ref:`comet.StrokeAttributes` dictionary - Added :py:ref:`comet.StrokeTypes` dictionary - Added :py:ref:`comet.TextFormats` dictionary - Added an :ref:`Examples` section - Added new context :py:data:`comet.kContextNoteParastyle` - Added new context :py:data:`comet.kContextNoteTargetLayer` - Added new context :py:data:`comet.kContextPODSpecialCases` :priint-red:`Incompatible changes` |br| - Removed constants from table module. Replaced by constants in comet module, e.g. :py:ref:`comet.RowTypes` - The following modules are deprecated and will be removed (already gone from documentation): *dialog, document, element, idtype, layoutrule, link, page, product, rect, table* . **All functionality is now moved to static functions in the appropriate classes** - comet.setGlobal is now named :py:func:`.comet.setOutput` - Removed :py:meth:`CParameter.getAll` - Removed :py:meth:`CParameter.get` - Removed :py:meth:`CParameter.createFromXML` - Removed :py:meth:`CParameter.toXML` - Removed :py:meth:`CPlanning.createFromXML` - Removed :py:meth:`CPlanning.toXML` - Removed :py:meth:`CPublication.get` - Removed :py:meth:`CPublication.createFromXML` - Removed :py:meth:`CPublication.toXML` - Removed :py:meth:`CPublicationType.getAll` - Removed :py:meth:`CPublicationType.createFromXML` - Removed :py:meth:`CPublicationType.toXML` - Removed :py:meth:`CWorkflowStatus.getAll` - Removed :py:meth:`CWorkflowStatus.get` - Removed :py:meth:`CWorkflowStatus.getAvailable` - Removed :py:meth:`CWorkflowStatus.createFromXML` - Removed :py:meth:`CWorkflowStatus.toXML` .. container:: priint-block **R29355** :priint-green:`Compatible changes` - A lot of refactoring has been done in moving module functions from their module to static class functions. - **New Modules**: - Added :py:mod:`.publication` module for querying priint:suite publication information - Added :py:func:`.publication.getPublications` - Added :py:func:`.publication.getAllParameters` - Added :py:func:`.publication.getAllPublicationTypes` - Added :py:func:`.publication.getAllWorkflowStates` - Added :py:func:`.publication.getParameters` - Added :py:func:`.publication.getWorkflowStates` - Added :py:func:`.publication.getWorkflowStatus` - **New Classes**: - Added :py:class:`.CParameter` - Added :py:meth:`.CParameter.createFromXML` - Added :py:meth:`.CParameter.getValue` - Added :py:meth:`.CParameter.toXML` - Added :py:class:`.CPlanning` - Added :py:meth:`.CPlanning.createFromXML` - Added :py:meth:`.CPlanning.getValue` - Added :py:meth:`.CPlanning.toXML` - Added :py:class:`.CPublication` - Added :py:meth:`.CPublication.createFromXML` - Added :py:meth:`.CPublication.getValue` - Added :py:meth:`.CPublication.toXML` - Added :py:class:`.CPublicationType` - Added :py:meth:`.CPublicationType.createFromXML` - Added :py:meth:`.CPublicationType.getValue` - Added :py:meth:`.CPublicationType.toXML` - Added :py:class:`.CWorkflowStatus` - Added :py:meth:`.CWorkflowStatus.createFromXML` - Added :py:meth:`.CWorkflowStatus.getValue` - Added :py:meth:`.CWorkflowStatus.toXML` - **New Functions**: - Added :py:meth:`.CDocument.getFront` - Added :py:meth:`.CDocument.open` - Added :py:meth:`.CDocument.getOpen` - Added :py:meth:`.CDocument.getRasterEffectResolution` - Added :py:meth:`.CDocument.getColorModel` - Added :py:meth:`.CDocument.getColorProfile` - Added :py:meth:`.CDocument.setColorProfile` - Added :py:meth:`.CDialog.create` - Added :py:meth:`.CElement.create` - Added :py:meth:`.CIDType.create` - Added :py:meth:`.CLink.collect` - Added :py:meth:`.CRect.create` - Added :py:meth:`.CRect.createSquare` - **Other new things**: - Added :py:ref:`comet.PublicationSelectors` constants and descriptions for querying publication class information - Added :py:ref:`comet.DocCloseModes` constants for closing documents in InDesign® - Added **comet.DocColorModels** constants for querying the document color model for Illustrator® - Added :py:ref:`comet.LinkSorting` constants - Added :py:ref:`comet.LinkFirstSelectors` constants - Added :py:data:`comet.kFrameTypeGroup`, :py:data:`comet.kFrameTypeLegacyText` and :py:data:`comet.kFrameTypeGraph` which can be returned from :py:meth:`.CFrame.getType` - **Fixes**: - |illu| Fixed comet.sync.setNewValue and setOldValue not working - |illu| Fixed CDocument.exportPDF not working - |illu| Fixed a crash involving CProduct instances - |illu| Fixed product.get not working - Fixed :py:func:`.page.snapshot` not parsing parameters correctly :priint-red:`Incompatible changes` - Removed link sorting constants from idtype module. Replaced by :py:ref:`comet.LinkSorting` - Removed first link selector constants from idtype module. Replaced by :py:ref:`comet.LinkFirstSelectors` .. container:: priint-block **R29302** :priint-green:`Compatible changes` - Documentation restructuring (Moved several articles from :ref:`usage` to :ref:`introduction`) - Python can now be used in the following additional situations (see :ref:`Availability`): - Template panel actions - Running other script types from Python now provides limited environment variable inheritance. See :py:ref:`usage.CallingOtherScripts` - New Functions: - Added :py:func:`.comet.selectFile` - Added :py:func:`.placeholder.load` - Added :py:func:`.placeholder.store` - Added :py:func:`.placeholder.build` - Added :py:meth:`.CDocument.setFront` - Added :py:meth:`.CDocument.close` - Added :py:meth:`.CFrame.getScriptTag` - :py:meth:`.CTextModel.getFont` now also returns the run length - :py:func:`.document.open` now has an *appendToRecent* parameter - Fixed :py:meth:`.CDocument.setAttribute` crashing - |illu| Fixed :py:meth:`.CFrame.moveTo` not working properly with moved artboards .. container:: priint-block **R29218** :priint-green:`Compatible changes` - All parameters for any functions are now keyword parameters - **New Modules**: - Added :py:mod:`.system` module which provides general comet environment information - Added :py:func:`.system.getApplicationPath` - Added :py:func:`.system.getPluginPath` - Added :py:func:`.system.getRevision` - Added :py:func:`.system.getCometVersion` - Added :py:mod:`.datapool` module which provides connection access for the comet data pool - Added :py:func:`.datapool.getConnection` - Added :py:func:`.datapool.loginSOAP` - Added :py:func:`.datapool.loginDB` - Added :py:func:`.datapool.loginXML` - Added :py:func:`.datapool.logout` - **New Classes**: - Added :py:class:`.CSOAP` class for SOAP connections - Added :py:meth:`.CSOAP.getServer` - Added :py:meth:`.CSOAP.getUser` - Added :py:meth:`.CSOAP.getLanguage` - Added :py:meth:`.CSOAP.getClient` - Added :py:meth:`.CSOAP.getCharset` - Added :py:meth:`.CSOAP.uploadFile` - Added :py:meth:`.CSOAP.uploadData` - Added :py:meth:`.CSOAP.uploadFolder` - Added :py:meth:`.CSOAP.download` - Added :py:meth:`.CSOAP.createQuery` - Added :py:class:`.CSQL` class for SQL connections - Added :py:meth:`.CSQL.getServer` - Added :py:meth:`.CSQL.getUser` - Added :py:meth:`.CSQL.getDBName` - Added :py:meth:`.CSQL.getClient` - Added :py:meth:`.CSQL.getCharset` - Added :py:meth:`.CSQL.createQuery` - Added :py:class:`.CQuery` class for SQL/SOAP queries - Added :py:meth:`.CQuery.send` - Added :py:meth:`.CQuery.input` - Added :py:meth:`.CQuery.output` - Added :py:meth:`.CQuery.execute` - Added :py:meth:`.CQuery.fetch` - Added :py:meth:`.CQuery.commit` - Added :py:meth:`.CQuery.rollback` - Added :py:meth:`.CQuery.getCommand` - Added :py:meth:`.CQuery.getParent` - **New Functions**: - Added :py:func:`.comet.runJavaScript` - Added :py:func:`.comet.runCScript` - Added :py:func:`.prefs.getTagsReadable` - Added :py:func:`.prefs.setTagsReadable` - Added :py:func:`.prefs.getURLLinkTimeout` - Added :py:func:`.prefs.setURLLinkTimeout` - Added :py:func:`.prefs.getURLLinkFolder` - Added :py:func:`.prefs.setURLLinkFolder` - Added :py:func:`.prefs.getUpdateType` - Added :py:func:`.prefs.setUpdateType` - Added :py:func:`.prefs.getUpdatePath` - Added :py:func:`.prefs.setUpdatePath` - Added :py:func:`.prefs.getDocWatch` - Added :py:func:`.prefs.setDocWatch` - Added :py:meth:`.CDocument.getDisplayName` - Added :py:meth:`.CDocument.setDisplayName` - Added :py:meth:`.CPage.getUID` - Added :py:meth:`.CPage.setIndex` - Added :py:meth:`.CPage.remove` - Added :py:meth:`.CTable.getUID` - Added :py:meth:`.CTable.removeRows` - Added :py:meth:`.CTable.removeColumns` - **Other new things**: - Added :py:ref:`comet.Sides` constants dictionary - Added :py:ref:`comet.ListTypes` constants dictionary - Added **comet.FrameTypes** constants dictionary - Added :py:ref:`comet.HostEnvironments` constants dictionary - Added :py:ref:`comet.LinkTypes` constants dictionary - Fixed :py:meth:`.CRect.setBottom` setting the wrong value - Fixed :py:meth:`.CTextModel.setCharStyle` expecting wrong parameter types - Fixed :py:meth:`.CTextModel.setParaStyle` expecting wrong parameter types :priint-red:`Incompatible changes` - :py:meth:`.CExcelBook.getFontColor` now returns a tuple instead of a list .. container:: priint-block **R29068** :priint-green:`Compatible changes` - Python can now be used in the following additional situations (see :ref:`Availability`): - URL Drop action ID - URL Drop - Build support - Alternative templates - All :py:class:`.CFrame` functions now do improved self checking whether the frame is still valid in the document, e.g. after deleting a frame - Multiple :py:class:`.CTable` functions now properly justify out of bounds column and row indices. - Functions of :py:mod:`.frame` which require a document now accept :py:data:`None` to use the current script document. - **New Functions**: - :py:func:`.frame.createCometGroup` - :py:func:`.frame.resolveCometGroup` - :py:func:`.placeholder.set` - :py:func:`.placeholder.link` - :py:func:`.placeholder.setTagValue` - :py:func:`.prefs.getCScriptBuffer` - :py:func:`.prefs.setCScriptBuffer` - :py:meth:`.CFrame.isValid` - :py:meth:`.CFrame.remove` - :py:meth:`.CFrame.getSmartItemData` - :py:meth:`.CFrame.setSmartItemData` - :py:meth:`.CFrame.getZOrder` - :py:meth:`.CFrame.moveForward` - :py:meth:`.CFrame.moveBackward` - :py:meth:`.CFrame.moveToFront` - :py:meth:`.CFrame.moveToBack` - :py:meth:`.CFrame.getIsInFront` - :py:meth:`.CFrame.getIsInBack` - :py:meth:`.CFrame.setCometGroupID` - :py:meth:`.CTable.remove` - :py:meth:`.CTable.getTextPosition` - :py:meth:`.CTable.getAnchorPosition` - :py:meth:`.CTable.getCellText` - :py:meth:`.CTable.getCellTextPosition` - :py:meth:`.CTable.getCellBox` - :py:meth:`.CTable.getCellFrame` - :py:meth:`.CTable.getCellInsets` - :py:meth:`.CTextModel.getFrame` - **Other new things**: - New context: :py:data:`.comet.kContextURLDropActionID` - New context: :py:data:`.comet.kContextURLDrop` - New context: :py:data:`.comet.kContextBuildSupport` - New context: :py:data:`.comet.kContextAlternativeTemplate` - New context: :py:data:`.comet.kContextTableModuleRecordID` - New context: :py:data:`.comet.kContextPublicationCheckout` - New context: :py:data:`.comet.kContextPublicationAfterSave` - New context: :py:data:`.comet.kContextPublicationBeforeClose` - New context: :py:data:`.comet.kContextPublicationStatus` - New context: :py:data:`.comet.kContextPublicationCheckin` - New context: :py:data:`.comet.kContextPublicationAfterClose` - New context: :py:data:`.comet.kContextPublicationRevert` - New context: :py:data:`.comet.kContextPublicationAfterCheckout` - New build situation constants to :py:mod:`.comet` module. See :py:ref:`comet.BuildSituations` - Fixed :py:func:`.link.collect` pages parameter not working - Fixed :py:meth:`.CFrame.setScriptTag` parameters *key* and *value* being swapped - Fixed :py:meth:`.CFrame.setScriptTag` putting strings in quotes - Fixed :py:meth:`.CFrame.setLayer` *layer* parameter being wrongfully optional :priint-red:`Incompatible changes` - :py:func:`.frame.createTextFrame` now uses a 0-based index for the page instead of 1 based .. container:: priint-block **R28940** :priint-green:`Compatible changes` - Python can now be used in the following additional situations (see :ref:`Availability`): - Layout rule dynamic parameter value lists - Layout rule dynamic definition - |indd| |comet-pdf| Table function variable parameter value lists - |indd| |comet-pdf| Table function variable dynamic definition - |indd| DocWatch - |indd| |illu| Comet Tests - URLLink Destination folder - We added a new output variable mechanism for writing to global variables depending on context. See :ref:`EnvOutputVars` and :py:func:`comet.setGlobal` - **New Modules**: - Added :py:mod:`.placeholder` module which contains placeholder action context relative functions: - Added :py:func:`.placeholder.getTagValue` - Added :py:mod:`.html` module which contains HTML utility functions - Added :py:func:`.html.getRawText` - Added :py:mod:`.element` module which contains factory functions for repeating element placeholders - Added :py:func:`.element.create` - **New Classes**: - Added :py:class:`.CElement` class for repeating elements - Added :py:meth:`.CElement.getID` - Added :py:meth:`.CElement.setID` - Added :py:meth:`.CElement.getTemplateID` - Added :py:meth:`.CElement.setTemplateID` - Added :py:meth:`.CElement.getClassID` - Added :py:meth:`.CElement.setClassID` - Added :py:meth:`.CElement.getFormatString` - Added :py:meth:`.CElement.setFormatString` - Added :py:meth:`.CElement.getMasterFrame` - Added :py:meth:`.CElement.getFrames` - Added :py:meth:`.CElement.getOrderNumber` - **New Functions**: - Added :py:func:`.frame.getCometGroupMembers` - Added :py:func:`.sync.getSyncState` - Added :py:func:`.sync.setSyncState` - Added :py:meth:`.CLayer.setIndex` - Added :py:meth:`.CLayer.remove` - Added :py:meth:`.CFrame.getUID` - Added :py:meth:`.CFrame.getBuiltElements` - **Other new things**: - Added :py:ref:`comet.SyncStates` constants to :py:mod:`comet` module - Added new context: :py:data:`.comet.kContextDocWatch` - Added new context: :py:data:`.comet.kContextURLLinkDestFolder` - **Fixes**: - Fixed :py:meth:`.CDocument.getMasterPageInfo` returning double prefixed names - Fixed :py:meth:`.CDocument.getBleed` always raising SystemError - Fixed :py:func:`.link.collect` sort parameter not working - Fixed :py:mod:`.idtype` module being unavailable - Fixed the following class instances not being properly checked for equality using the :priint-important:`==` operator: - :py:class:`.CDialog` - :py:class:`.CDocument` - :py:class:`.CExcelBook` - :py:class:`.CFrame` - :py:class:`.CIDType` - :py:class:`.CLayer` - :py:class:`.CLink` - :py:class:`.CPage` - :py:class:`.CRect` - :py:class:`.CTable` - :py:class:`.CTextModel` :priint-red:`Incompatible changes` - Renamed module **layoutRule** to :py:mod:`.layoutrule` (lower case *r*) - Moved :py:ref:`comet.LinkTypes` constants from :py:class:`.CLink` to :py:mod:`comet` module .. container:: priint-block **R28889** :priint-green:`Compatible changes` - Added :py:func:`.frame.getBBox` - Added :py:func:`.frame.moveTo` - Added :py:meth:`.CDocument.addLayer` (was not implemented) - Added :py:meth:`.CDocument.getLayers` (was not implemented) - Added :py:meth:`.CDocument.getDefaultLayerName` - Added :py:meth:`.CDocument.getCurrentPage` - Added :py:meth:`.CDocument.getMasterPageInfo` - Added :py:meth:`.CFrame.getCometGroupID` - Added :py:meth:`.CFrame.getDocument` - Added :py:meth:`.CFrame.getImagePosition` - Added :py:meth:`.CFrame.getName` - Added :py:meth:`.CFrame.fitImage` - Added :py:meth:`.CFrame.getImageSize` - Added :py:meth:`.CFrame.setImageSize` - Added :py:meth:`.CFrame.setImagePosition` - Added :py:meth:`.CFrame.getImageScale` - Added :py:meth:`.CFrame.setImageScale` - Added :py:meth:`.CFrame.getImageRotation` - Added :py:meth:`.CFrame.setImageRotation` - Added :py:meth:`.CFrame.setLayer` - Added :py:meth:`.CLayer.getIndex` - Added :py:meth:`.CPage.getFrames` - Added :py:meth:`.CPage.getMasterPage` - Added :py:meth:`.CPage.setMasterPage` - Added :py:class:`.CDialog` class for creating custom dialogs: - Added :py:meth:`.CDialog.setTitle` - Added :py:meth:`.CDialog.setSize` - Added :py:meth:`.CDialog.addLabel` - Added :py:meth:`.CDialog.addCheckBox` - Added :py:meth:`.CDialog.addIntField` - Added :py:meth:`.CDialog.addFloatField` - Added :py:meth:`.CDialog.addTextField` - Added :py:meth:`.CDialog.addMultilineTextField` - Added :py:meth:`.CDialog.addMultilineTextInfo` - Added :py:meth:`.CDialog.addDropDown` - Added :py:meth:`.CDialog.addDefaultButtons` - Added :py:meth:`.CDialog.show` - Added :py:meth:`.CDialog.getConfirmingButton` - Added :py:meth:`.CDialog.getCheckBoxValue` - Added :py:meth:`.CDialog.getTextFieldValue` - Added :py:meth:`.CDialog.getMultiLineTextFieldValue` - Added :py:meth:`.CDialog.getFloatFieldValue` - Added :py:meth:`.CDialog.getIntFieldValue` - Added :py:meth:`.CDialog.getDropDownValue` - Added :py:meth:`.CDialog.getSpecification` - Added :py:mod:`.dialog` module which contains factory functions for :py:class:`.CDialog`: - :py:func:`.dialog.create` - :py:meth:`.CFrame.moveTo` now also accepts :py:class:`.CPage` as value for the *page* parameter - Fixed :py:meth:`.CLayer.getVisible` returning wrong values for Illustrator - Fixed gDocument not being available in panel actions - Fixed :py:func:`.link.collect` parameters *pages* and *placeHolderIDs* not being evaluated .. container:: priint-block **R28810** :priint-green:`Compatible changes` - InDesign can now use Python in the following situations properly: - Placeholder load, build, sync, store (frame and text) - Placeholder build post event - Publications panel doubleclick - Publications events (checkout, after save, after open, etc...) - Panel actions for panels: Settings, Publications, Product pool - Added missing context constants: - :py:data:`comet.kContextXMLScript` - :py:data:`comet.kContextCometTestPreScript` - :py:data:`comet.kContextCometTestScript` - :py:data:`comet.kContextCometTestPostScript` - :py:data:`comet.kContextPlaceHolderStringCompare` - :py:data:`comet.kContextPlaceHolderBuildPost` - Added gTextModel to :py:ref:`EnvironmentVariables` where appropriate - Added :py:meth:`.CFrame.getTextModel` - Added :py:meth:`.CDocument.getPages` - Added :py:meth:`.CFrame.getPage` - Added :py:meth:`.CPage.getDocument` - Added :py:meth:`.CPage.getIndex` - Added :py:meth:`.CPage.getIndexInSpread` - Added :py:meth:`.CPage.getType` - Added :py:meth:`.CPage.getSize` - Added :py:meth:`.CPage.setSize` - Added :py:meth:`.CPage.getMargins` - Added :py:meth:`.CPage.setMargins` - Added :py:meth:`.CPage.getColumnCount` - Added :py:meth:`.CPage.getColumnGutter` - Added :py:meth:`.CPage.getName` - Added new constants for page types - see :py:ref:`comet.PageTypes` - Added new :py:mod:`.prefs` module with new functions: - :py:func:`.prefs.getAddW2MLToTemplates` - :py:func:`.prefs.setAddW2MLToTemplates` - :py:func:`.prefs.getAddW2MLToSnippets` - :py:func:`.prefs.setAddW2MLToSnippets` - :py:func:`.prefs.getAddMetaDataToTemplates` - :py:func:`.prefs.setAddMetaDataToTemplates` - :py:func:`.prefs.getTagsWriteable` - :py:func:`.prefs.setTagsWriteable` - :py:func:`.prefs.setPanelEnabled` - Fixed gParam1...gParam4 not being available for InDesign layout rules and conditions - Fixed gDocument not being available for InDesign layout rules and conditions - Fixed a crash when placeholder funcvar dynamic definition script was empty - :py:meth:`.CFrame.getImage` no longer fails if the frame is an empty graphic frame and now returns an empty str :priint-red:`Incompatible changes` - Removed *CDocument.getPageCount* (was not implemented) .. container:: priint-block **R28726/28730/28732** :priint-green:`Compatible changes` - Added :py:func:`.wtlog` - Added :py:meth:`.CDocument.getBleed` - Added :py:meth:`.CDocument.setBleed` - Added :py:meth:`.CFrame.getLayer` - Added :py:meth:`.CFrame.getObjectStyle` - Added :py:meth:`.CFrame.setObjectStyle` - Added :py:meth:`.CTable.fitColumn` - Added :py:meth:`.CTable.getCellSize` - Added :py:meth:`.CTable.getCellStyle` - Added :py:meth:`.CTable.setCellStyle` - Added :py:meth:`.CTable.insertRows` - Added :py:meth:`.CTable.insertColumns` - Added :py:func:`.table.find` - Added default parameter to :py:meth:`comet.wlog` which appends a new line - Added proper global variables and context to InDesign panel actions - Added panel actions for Illustrator - Added ExtendScript calls for Illustrator - Added allow login action for Illustrator & InDesign - Added after login action for Illustrator & InDesign - Added example for :py:meth:`.CDocument.getStyleNames` - Added documentation for :py:meth:`.CDocument.hasAttribute` - Added global variables to InDesign layout rules (gFrame, gDocument, gStart, gLen, gItem, ...) - Added parameters removeTableOverrides and removeCellStyles to :py:meth:`.CTable.setStyle` - CTable functions in Illustrator should now properly justify the provided indices :priint-red:`Incompatible changes` - CFrame.getImagePath is now called :py:meth:`.CFrame.getImage` .. container:: priint-block **R28703/28704** :priint-green:`Compatible changes` - Added :py:ref:`comet.StyleTypes` constants to :py:mod:`comet` module - Added :py:meth:`.CDocument.getStyleNames` - Added :py:meth:`.CFrame.getText` - Added :py:meth:`.CFrame.getSize` - Added :py:meth:`.CFrame.setSize` - Added :py:meth:`.CFrame.isInline` - Added :py:meth:`.CRect.getValues` - Added :py:ref:`usage.ImportDirectives` documentation - Added Pubserver imports from [pubserver] paths - Fixed :py:meth:`.CDocument.getFrames` crashing when there are no frames in the document - Fixed :py:meth:`.CDocument.getFrames` crashing when the layers parameter is empty - Fixed :py:func:`.link.collect` not working with None document - Fixed :py:func:`.link.collect` having wrong defaults for edge parameter - Some docu look updates :priint-red:`Incompatible changes` - Fixed :py:meth:`.CFrame.getBBox` returning wrong data type (tuple instead of :py:class:`.CRect`)