comet.constants

The constants module contains convenience constants for making scripts more readable. Callers can use the constant names instead of their represented values and check return values against them.

Constants

Host environments

comet.constants.kHostInDesign = 0

InDesign®

comet.constants.kHostInDesignServer = 1

InDesign® Server

comet.constants.kHostCometPDF = 2

comet_pdf

comet.constants.kHostIllustrator = 3

Illustrator®

kHosts
{ 0: 'kHostInDesign',
  1: 'kHostInDesignServer',
  2: 'kHostCometPDF',
  3: 'kHostIllustrator'}

Designate

comet.constants.kDesignateUndef = 0

Undefined

comet.constants.kDesignateCursor = 1

At cursor

comet.constants.kDesignateSelected = 2

Selection

comet.constants.kDesignateDocument = 3

Document

comet.constants.kDesignateVisibleLayers = -1

Visible layers

comet.constants.kDesignateActiveLayer = -2

Active layer

kDesignate
{ 0: 'kDesignateUndef',
  1: 'kDesignateCursor',
  2: 'kDesignateSelected',
  3: 'kDesignateDocument',
  -1: 'kDesignateVisibleLayers',
  -2: 'kDesignateActiveLayer'}

Contexts

comet.constants.kContextUnknown = -1
comet.constants.kContextPlaceHolderLoad = 0
comet.constants.kContextPlaceHolderSync = 1
comet.constants.kContextPlaceHolderStore = 2
comet.constants.kContextPlaceHolderBuild = 3
comet.constants.kContextPlaceHolderBuildPost = 4
comet.constants.kContextPlaceHolderPrefix = 5
comet.constants.kContextPlaceHolderPostfix = 6
comet.constants.kContextPanelAction = 7
comet.constants.kContextLayoutRule = 8
comet.constants.kContextLayoutRuleCondition = 9
comet.constants.kContextLayoutRuleDynamicList = 10
comet.constants.kContextProductBuildPre = 11
comet.constants.kContextBuildSupport = 12
comet.constants.kContextFuncVarDynamicDef = 13
comet.constants.kContextFuncVarAvailValues = 14
comet.constants.kContextBatch = 15
comet.constants.kContextDoubleClickProductPool = 16
comet.constants.kContextDoubleClickPublications = 17
comet.constants.kContextDoubleClickPreviews = 18
comet.constants.kContextExtendScript = 19
comet.constants.kContextAllowLogin = 20
comet.constants.kContextAfterLogin = 21
comet.constants.kContextXMLScript = 22
comet.constants.kContextCometTestPreScript = 23
comet.constants.kContextCometTestScript = 24
comet.constants.kContextCometTestPostScript = 25
comet.constants.kContextPlaceHolderStringCompare = 26
comet.constants.kContextDocWatch = 27
comet.constants.kContextURLLinkDestFolder = 28
comet.constants.kContextURLLinkHeaderData = 29
comet.constants.kContextURLDropActionID = 30
comet.constants.kContextURLDrop = 31
comet.constants.kContextAlternativeTemplate = 32
comet.constants.kContextTableModuleInsertRow = 33
comet.constants.kContextTableModuleOmitRow = 34
comet.constants.kContextTableModuleInsertColumn = 35
comet.constants.kContextTableModuleOmitColumn = 36
comet.constants.kContextTableModuleLayoutRule = 37
comet.constants.kContextTableModuleCellID = 38
comet.constants.kContextPublicationCheckout = 39
comet.constants.kContextPublicationAfterSave = 40
comet.constants.kContextPublicationBeforeClose = 41
comet.constants.kContextPublicationStatus = 42
comet.constants.kContextPublicationCheckin = 43
comet.constants.kContextPublicationAfterClose = 44
comet.constants.kContextPublicationRevert = 45
comet.constants.kContextPublicationAfterCheckout = 46
comet.constants.kContextNoteParastyle = 47
comet.constants.kContextNoteTargetLayer = 48
comet.constants.kContextPODSpecialCases = 49
comet.constants.kContextProductPoolEntries = 50
comet.constants.kContextProductPoolSFDefaultValue = 51
comet.constants.kContextToDoListCustomTask = 52
comet.constants.kContextPreviewsEntries = 53
comet.constants.kContextPageTemplateAfterApply = 55
comet.constants.kContextServerInterface = 56
comet.constants.kContextStampAction = 57
comet.constants.kContextExcelQueryFunction = 58
kContexts
{ -1: 'kContextUnknown',
  0: 'kContextPlaceHolderLoad',
  1: 'kContextPlaceHolderSync',
  2: 'kContextPlaceHolderStore',
  3: 'kContextPlaceHolderBuild',
  4: 'kContextPlaceHolderBuildPost',
  5: 'kContextPlaceHolderPrefix',
  6: 'kContextPlaceHolderPostfix',
  7: 'kContextPanelAction',
  8: 'kContextLayoutRule',
  9: 'kContextLayoutRuleCondition',
  10: 'kContextLayoutRuleDynamicList',
  11: 'kContextProductBuildPre',
  12: 'kContextBuildSupport',
  13: 'kContextFuncVarDynamicDef',
  14: 'kContextFuncVarAvailValues',
  15: 'kContextBatch',
  16: 'kContextDoubleClickProductPool',
  17: 'kContextDoubleClickPublications',
  18: 'kContextDoubleClickPreviews',
  19: 'kContextExtendScript',
  20: 'kContextAllowLogin',
  21: 'kContextAfterLogin',
  22: 'kContextXMLScript',
  23: 'kContextCometTestPreScript',
  24: 'kContextCometTestScript',
  25: 'kContextCometTestPostScript',
  26: 'kContextPlaceHolderStringCompare',
  27: 'kContextDocWatch',
  28: 'kContextURLLinkDestFolder',
  29: 'kContextURLLinkHeaderData',
  30: 'kContextURLDropActionID',
  31: 'kContextURLDrop',
  32: 'kContextAlternativeTemplate',
  33: 'kContextTableModuleInsertRow',
  34: 'kContextTableModuleOmitRow',
  35: 'kContextTableModuleInsertColumn',
  36: 'kContextTableModuleOmitColumn',
  37: 'kContextTableModuleLayoutRule',
  38: 'kContextTableModuleCellID',
  39: 'kContextPublicationCheckout',
  40: 'kContextPublicationAfterSave',
  41: 'kContextPublicationBeforeClose',
  42: 'kContextPublicationStatus',
  43: 'kContextPublicationCheckin',
  44: 'kContextPublicationAfterClose',
  45: 'kContextPublicationRevert',
  46: 'kContextPublicationAfterCheckout',
  47: 'kContextNoteParastyle',
  48: 'kContextNoteTargetLayer',
  49: 'kContextPODSpecialCases',
  50: 'kContextProductPoolEntries',
  51: 'kContextProductPoolSFDefaultValue',
  52: 'kContextToDoListCustomTask',
  53: 'kContextPreviewsEntries',
  54: 'kContextPreviewsLink',
  55: 'kContextPageTemplateAfterApply',
  56: 'kContextServerInterface',
  57: 'kContextStampAction',
  58: 'kContextExcelQueryFunction'}

Action types

comet.constants.kActionTypeLoad = 1

Placeholder load action

comet.constants.kActionTypeStore = 2

Placeholder store action

comet.constants.kActionTypeSync = 3

Placeholder sync action

comet.constants.kActionTypeBuild = 4

Placeholder build action for repeating elements

kActionTypes
{ 1: 'kActionTypeLoad',
  2: 'kActionTypeStore',
  3: 'kActionTypeSync',
  4: 'kActionTypeBuild'}

Indices

comet.constants.kStart = 0

Start

comet.constants.kEnd = -1

End

comet.constants.kTotalEnd = -3

End including tables

kIndices
{0: 'kStart', -2: 'kSelection', -1: 'kEnd', -3: 'kTotalEnd'}

Sides

comet.constants.kSideLeft = 1

Left

comet.constants.kSideTop = 2

Top

comet.constants.kSideRight = 4

Right

comet.constants.kSideBottom = 8

Bottom

comet.constants.kSideAll = 15

All sides

kSides
{ 0: 'kSideNone',
  1: 'kSideLeft',
  4: 'kSideRight',
  2: 'kSideTop',
  8: 'kSideBottom',
  15: 'kSideAll'}

Reference Points

comet.constants.kRefPointTopLeft = 0

Top left

comet.constants.kRefPointTopCenter = 1

Top center

comet.constants.kRefPointTopRight = 2

Top right

comet.constants.kRefPointLeftCenter = 3

Left center

comet.constants.kRefPointCenter = 4

Center

comet.constants.kRefPointRightCenter = 5

Right center

comet.constants.kRefPointBottomLeft = 6

Bottom left

comet.constants.kRefPointBottomCenter = 7

Bottom center

comet.constants.kRefPointBottomRight = 8

Bottom right

kReferencePoints
{ 0: 'kRefPointTopLeft',
  1: 'kRefPointTopCenter',
  2: 'kRefPointTopRight',
  3: 'kRefPointLeftCenter',
  4: 'kRefPointCenter',
  5: 'kRefPointRightCenter',
  6: 'kRefPointBottomLeft',
  7: 'kRefPointBottomCenter',
  8: 'kRefPointBottomRight'}

Image placement

comet.constants.kPlaceTopLeft = 8192

Top left

comet.constants.kPlaceTopCenter = 16384

Top center

comet.constants.kPlaceTopRight = 24576

Top right

comet.constants.kPlaceMiddleLeft = 32768

Left center

comet.constants.kPlaceCentered = 40960

Center

comet.constants.kPlaceMiddleRight = 49152

Right center

comet.constants.kPlaceBottomLeft = 57344

Bottom left

comet.constants.kPlaceBottomCenter = 65536

Bottom center

comet.constants.kPlaceBottomRight = 73728

Bottom right

comet.constants.kPlaceLikeExisting = 1048576

Place like existing

comet.constants.kPlaceWithFittingOptions = 2097152

Place with fitting options

comet.constants.kPlaceRemoveIfNoExist = 4194304

Don’t place when the image does not exist

Text formats

Format specifications with the identifier Plus in the name additionally replace all automatic page numbers, paragraph names and footnote markers by their current values.

comet.constants.kExportPlain = 0

Export purely unformatted text of the document. Characters greater 127 not defined in the extented ASCII set of Windows and Macintosh are coded in the format <00AD>.

comet.constants.kExportTagged = 1
comet.constants.kExportTT = 2
comet.constants.kExportW2 = 3
comet.constants.kExportUnitext = 4
comet.constants.kExportXUnitext = 5
comet.constants.kExportPlainWithTables = 7
comet.constants.kExportUnitextWithTables = 8
comet.constants.kExportXUnitextWithTables = 9
comet.constants.kExportPlainNoTypografics = 10
comet.constants.kExportPlainWithTablesNoTypografics = 11
comet.constants.kExportHTML = 12
comet.constants.kExportHTMLWithTables = 13
comet.constants.kExportRTF = 14
comet.constants.kExportXMLUnitext = 15
comet.constants.kExportXMLUnitextWithTables = 16
comet.constants.kExportHTMLWithStyles = 17
comet.constants.kExportW2Raw = 18
comet.constants.kExportPlusPlain = 19
comet.constants.kExportPlusUnitext = 20
comet.constants.kExportPlusXUnitext = 21
comet.constants.kExportPlusXMLUnitext = 22
comet.constants.kExportPlusPlainNoTypografics = 23
comet.constants.kExportPlusHTML = 24
comet.constants.kExportW2ML = 25
comet.constants.kExportHTMLWithStylesAndCSS = 26
kTextFormats
{ 0: 'kExportPlain',
  1: 'kExportTagged',
  2: 'kExportTT',
  3: 'kExportW2',
  4: 'kExportUnitext',
  5: 'kExportXUnitext',
  7: 'kExportPlainWithTables',
  8: 'kExportUnitextWithTables',
  9: 'kExportXUnitextWithTables',
  10: 'kExportPlainNoTypografics',
  11: 'kExportPlainWithTablesNoTypografics',
  12: 'kExportHTML',
  13: 'kExportHTMLWithTables',
  14: 'kExportRTF',
  15: 'kExportXMLUnitext',
  16: 'kExportXMLUnitextWithTables',
  17: 'kExportHTMLWithStyles',
  18: 'kExportW2Raw',
  19: 'kExportPlusPlain',
  20: 'kExportPlusUnitext',
  21: 'kExportPlusXUnitext',
  22: 'kExportPlusXMLUnitext',
  23: 'kExportPlusPlainNoTypografics',
  24: 'kExportPlusHTML',
  25: 'kExportW2ML',
  26: 'kExportHTMLWithStylesAndCSS'}

Pageitem types

comet.constants.kPageItemTypeUnknown = -1

Type could not be determined or is unknown.

comet.constants.kPageItemTypeText = 0

Text frame

comet.constants.kPageItemTypeGraphic = 1

Graphic (frame)

comet.constants.kPageItemTypeGroup = 2

Group

comet.constants.kPageItemTypeLegacyText = 3

Legacy text (Illustrator)

comet.constants.kPageItemTypeGraph = 4

Graph (Illustrator)

comet.constants.kPageItemTypeGuide = 5

Guide

comet.constants.kPageItemTypeQRCode = 6

QR Code

comet.constants.kPageItemTypeTextOnPath = 7

Text on a path

kPageItemTypes
{ -1: 'kPageItemTypeUnknown',
  0: 'kPageItemTypeText',
  1: 'kPageItemTypeGraphic',
  2: 'kPageItemTypeGroup',
  3: 'kPageItemTypeLegacyText',
  4: 'kPageItemTypeGraph',
  5: 'kPageItemTypeGuide',
  6: 'kPageItemTypeQRCode',
  7: 'kPageItemTypeTextOnPath'}

List types

comet.constants.kListTypeNone = 0

No list

comet.constants.kListTypeBullet = 1

Bullet list

comet.constants.kListTypeNumbered = 2

Numbered list

kListTypes
{0: 'kListTypeNone', 1: 'kListTypeBullet', 2: 'kListTypeNumbered'}

Basic types

comet.constants.kInt = 1
comet.constants.kFloat = 2
comet.constants.kString = 3
kBasicTypes
{1: 'kInt', 2: 'kFloat', 3: 'kString'}

Layout rule situations

comet.constants.kLayoutRuleSituationCreate = 1

After creation

comet.constants.kLayoutRuleSituationLoad = 2

After loading

comet.constants.kLayoutRuleSituationReorganize = 4

After reorganization

comet.constants.kLayoutRuleSituationGeometryChange = 8

After geometry change

comet.constants.kLayoutRuleSituationBuild = 32

After build

comet.constants.kLayoutRuleSituationAll = 4294967295
kLayoutRuleSituations
{ 1: 'kLayoutRuleSituationCreate',
  2: 'kLayoutRuleSituationLoad',
  4: 'kLayoutRuleSituationReorganize',
  8: 'kLayoutRuleSituationGeometryChange',
  32: 'kLayoutRuleSituationBuild',
  4294967295: 'kLayoutRuleSituationAll'}

Style types

comet.constants.kStyleTypeObject = 1

Object style

comet.constants.kStyleTypeTable = 2

Table style

comet.constants.kStyleTypeCell = 3

Cell style

comet.constants.kStyleTypeParagraph = 4

Pragraph style

comet.constants.kStyleTypeCharacter = 5

Character style

kStyleTypes
{ 1: 'kStyleTypeObject',
  2: 'kStyleTypeTable',
  3: 'kStyleTypeCell',
  4: 'kStyleTypeParagraph',
  5: 'kStyleTypeCharacter'}

Page types

comet.constants.kPageTypeUnknown = -1

Not found or could not be determined

comet.constants.kPageTypeLeft = 0

Left page

comet.constants.kPageTypeUnisex = 1

Inner page or page of a spread with a single page

comet.constants.kPageTypeRight = 2

Right page

kPageTypes
{ -1: 'kPageTypeUnknown',
  0: 'kPageTypeLeft',
  1: 'kPageTypeUnisex',
  2: 'kPageTypeRight'}

Panel IDs

comet.constants.kPanelUndef = 0

Undefined or unknown.

comet.constants.kPanelProducts = 3

InDesign® Illustrator® Product Pool

comet.constants.kPanelPreviews = 6

InDesign® Previews

comet.constants.kPanelPageitems = 8

InDesign® Templates

comet.constants.kPanelPublications = 9

InDesign® Illustrator® Publications

comet.constants.kPanelToDoList = 10

InDesign® Illustrator® To Dos

comet.constants.kPanelPlaceholder = 125

InDesign® Illustrator® Placeholder

comet.constants.kPanelPlaceholderValues = 401

InDesign® Illustrator® Placeholder options

comet.constants.kPanelPageitemsBehavior = 402

InDesign® Illustrator® Template behavior

comet.constants.kPanelCometAdmin = 405

InDesign® Comet

comet.constants.kPanelLayoutRules = 408

InDesign® Illustrator® Frame Rules

comet.constants.kPanelFrameTags = 409

InDesign® Illustrator® Frame Tags

comet.constants.kPanelAreaBuild = 410

InDesign® Area Build

comet.constants.kPanelPriintAdjust = 411

InDesign® priint:adjust

comet.constants.kPanelPriintAdjustList = 412

InDesign® :adjust frame list

comet.constants.kPanelPlaceholderValuesInfo = 413

InDesign® Placeholder options info

comet.constants.kPanelFrontRow = 414

InDesign® Illustrator® Front row

comet.constants.kPanelNotes = 415

InDesign® Comet notes

comet.constants.kPanelPreviewDetails = 416

InDesign® Preview details

comet.constants.kPanelProductsOfDocument = 417

InDesign® Products of Document

comet.constants.kPanelPublicationInfo = 418

InDesign® Publication Info

comet.constants.kPanelSettings = 419

InDesign® Illustrator® Settings

comet.constants.kPanelCometTests = 420

InDesign® Illustrator® Comet Tests

InDesign® Illustrator® Web Images

comet.constants.kPanelDocumentAttributes = 500

Illustrator® Document Attributes

comet.constants.kPanelTables = 502

Illustrator® Tables

comet.constants.kPanelTableStyles = 503

Illustrator® Table Styles

comet.constants.kPanelCellStyles = 504

Illustrator® Cell Styles

comet.constants.kPanelBatch = 506

Illustrator® Batch

kPanelIDs
{ 0: 'kPanelUndef',
  3: 'kPanelProducts',
  6: 'kPanelPreviews',
  8: 'kPanelPageitems',
  9: 'kPanelPublications',
  10: 'kPanelToDoList',
  125: 'kPanelPlaceholder',
  401: 'kPanelPlaceholderValues',
  402: 'kPanelPageitemsBehavior',
  405: 'kPanelCometAdmin',
  408: 'kPanelLayoutRules',
  409: 'kPanelFrameTags',
  410: 'kPanelAreaBuild',
  411: 'kPanelPriintAdjust',
  412: 'kPanelPriintAdjustList',
  413: 'kPanelPlaceholderValuesInfo',
  414: 'kPanelFrontRow',
  415: 'kPanelNotes',
  416: 'kPanelPreviewDetails',
  417: 'kPanelProductsOfDocument',
  418: 'kPanelPublicationInfo',
  419: 'kPanelSettings',
  420: 'kPanelCometTests',
  421: 'kPanelURLLink',
  500: 'kPanelDocumentAttributes',
  502: 'kPanelTables',
  503: 'kPanelTableStyles',
  504: 'kPanelCellStyles',
  506: 'kPanelBatch'}

Sync states

comet.constants.kSyncStateUndefined = -6

State undefined

comet.constants.kSyncStateOverridden = -5

State overridden

comet.constants.kSyncStateLoadError = -4

Error while trying to ascertain sync state

comet.constants.kSyncStateNoMarker = -3

No state marker set yet

comet.constants.kSyncStateNotFound = -2

Object not found

comet.constants.kSyncStateChanged = -1

Changed

comet.constants.kSyncStateRemoved = 0

Removed

comet.constants.kSyncStateOk = 1

Ok

comet.constants.kSyncStateNotUnique = 2

Object not unique

kSyncStates
{ -6: 'kSyncStateUndefined',
  -5: 'kSyncStateOverridden',
  -4: 'kSyncStateLoadError',
  -3: 'kSyncStateNoMarker',
  -2: 'kSyncStateNotFound',
  -1: 'kSyncStateChanged',
  0: 'kSyncStateRemoved',
  1: 'kSyncStateOk',
  2: 'kSyncStateNotUnique'}

Build situations

comet.constants.kSituationCheckSizeBefore = 1
comet.constants.kSituationCheckSizeAfter = 2
comet.constants.kSituationBeforeCreateContinue = 3
comet.constants.kSituationAfterCreateContinue = 4
comet.constants.kSituationProductPlaced = 5
comet.constants.kSituationUnsolvableOversets = 6
comet.constants.kSituationAfterBuild = 20
comet.constants.kSituationProductFinished = 21
kBuildSituations
{ 1: 'kSituationCheckSizeBefore',
  2: 'kSituationCheckSizeAfter',
  3: 'kSituationBeforeCreateContinue',
  4: 'kSituationAfterCreateContinue',
  5: 'kSituationProductPlaced',
  6: 'kSituationUnsolvableOversets',
  20: 'kSituationAfterBuild',
  21: 'kSituationProductFinished'}

Placeholder slots

Placeholder slots are used in conjunction with placeholder.getTagValue() and placeholder.setTagValue()

Identifier (str)

Type

Notes

Placeholder, Platzhalter

int

The associated placeholder definition should exist and be of the correct type.

ID

Object-ID, comprised of three numbers and a string.

ID2

ID3

STRINGID

str

STRINGID1

STRINGID2

STRINGID3

Class

int

Class ID of the object, which can be linked with this placeholder.

Select

int

IDs of the actions which can be executed from the placeholders.

Sync

Update

Lov

ObjectNameID

RelatedTo

Type of the placeholder

1 : text
2 : textframe
3 : imageframe
4 : xmlelement
5 : Document action
6 : multiframe (Repeated Element)
7 : multitext (Repeated Text)
8 : Serial letter placeholder (Plugin Serial letter)
-2000 : Excel-supported table (Pluginin XCell)

Color

ID of a color. The color is used to present the placeholder in the placeholder panel and in the document.

SyncStateInvisible

Can the placeholder display a status (see get_sync) or not?

0 : Do not show
1 : Status can be shown

LoadConstraint

Unused

Format

For repeating elements the ID of the action is specified here which is to be executed if the elements are to be set up

Group

Group ID of a placeholder frame. The group ID is allocated for Document build, so that frames are located on the same grid locations even though these are not grouped in InDesign®.

Name

str

For Excel-supported tables contains the path of the associated Excel table. Relative paths are determined depending on the document.

Table

Check sum, do NOT change!

Created

Date information in the format YYYYMMDDHHMMSS

Modified

Grid

int

Specification of the document build. The value of these fields can be set in the plugin Build rules.

You can use Pre- and PostRule to create new pages :

-1 : New page
-2 : New left page
-3 : New right page

GridElement

PreRule

PostRule

PreRuleParams

str

PostRuleParams

AdParams

Infos1

Additional information to the placeholder. The specifications are limited to 4000 characters. If the specification is longer than 4000 characters, the empty string is used.

Infos1

SequenceNr

int

Sequence in which the frames of a template are loaded during insertion. If no sequence number is specified (0), the frames are loaded in a default order.
The specification only has a meaning when inserting templates that consist of several frames. The same sequence is applied after insertion (PostScript)..

PostScript

After inserting the frame using a template, a post-processing procedure can be executed.
The ID specifies the number of the action to be executed. The actions frame postscripts must have the ClassID 16.
If a template consists of several frames, the sequence of execution can be specified via SequenceNr.

ShowPostScript

Should the sequence number and postscript ID be shown in the document? The display only occurs if placeholders are also displayed.

TextflowType

How to use the frame in case of a text flow?

0 : Insert text content
1 : Insert as inline
2 : Do not insert

TextflowOnly

If the frame is part of a template, this value controls how to deal with the frame in normal (drag’n drop, build products, …) template inserts.

0 : Take this frame to the document
1 : Do not insert this frame into the document unless a text flow build is running.

TextflowUsage

Internal, do not change!

AdaptSequ

Internal, do not change!

AdaptGroup

str

Internal, do not change!

PageitemID

int

ID of the template which built this frame.

Template ID vs. product template ID Imagine a product is built with template 100 and gets frames 1, 2, 3. frame 2 creates two more frames (4 and 5) with document::place_items and template 300.

Until v3.2.3 the frames have the following PageitemID :

  • Frame 1 : 100

  • frame 2 : 100

  • frame 3 : 100

  • Frame 4 : 300

  • Frame 5 : 300

If the document is now reorganized, it can no longer be clearly determined with which template the product was built and the reorganization may now use template 300 for the product instead of the desired template 100. From v3.3 PageitemID therefore contains the unique product template ID for all frames of the product, in this case 100 :

  • Frame 1 : 100

  • Frame 2 : 100

  • Frame 3 : 100

  • Frame 4 : 100

  • Frame 5 : 100

With the value PageitemDirectID you can get the ID of the template with which a frame was inserted.

OrgPageitemID

A product is to be built with a certain template. This template has a TemplateID script and instead of the passed template another template is used. In OrgPageitemID the original templateID is still retained.

e.g.
Product with template 100
TemplateID script of template 100 calculates as ID 110
OrgPageitemID = 100
Pageitem = 110
PageitemDirectID = 110

SmartInfo

str

Information about the template behavior. The string is structured as described in the following table. You can change the content of the SmartInfo.
However, make sure that the string remains syntactically correct according to the following table. The individual fields are separated by spaces.
Incorrect entries can lead to errors in the program and document!
The string can be supplemented by Werk II with further data. Do not add your own data here! You can store your own data in the fields Infos1 and Infos2.

Type

Description

str

Frame label, one character only

int [0-23]

Color-ID

int [0-6]

Page type of the frame

  • 0 : undefined

  • 1 : left

  • 2 : right

  • 3 : continuation left

  • 4 : continuation right

  • 5 : spread

  • 6 : continuation spread

int [0-3]

Continuation type

  • 0 : normal

  • 1 : continue frame (triangle)

  • 2 : repetition (unused)

  • 3 : continue frame with fixed height (empty triangle)

str

Internal ID. Do not change!

int

Flags (bit field)

  • 0x00000001 : Load frame place holders

  • 0x00000002 : Load text place holders

int [0-3]

Area type

  • 0 : Bounding Box

  • 1 : Path (Star)

  • 2 : Path with holes (empty star)

  • 3 : ignore (Minus)

ObjectNameID

int

ID of the action with which the object name can be calculated

BuiltByID

ID of product which built this frame

BuiltByID2

BuiltByID3

BuiltByStringID

str

BuildRemains

int

Number of elements that could not be inserted because the repeating frame is full

Chapter

[unused] Chapter id

ChapterRule

[unused] 0 : new left page, 1 : new page, 2 : new right page

HeightFromTemplate

str

Original height from the template.

OriginBBox

Original bbox of frame from the template. Blank delimited string of four floats.

Prefix

Text to insert into the document before/behind the placeholder, if the placeholder is not empty

Postfix

PrefixIfEmpty

Text to insert into the document before/behind the placeholder, if the placeholder is empty

PostfixIfEmpty

Continue

int

Unique id of the continuing template the frame belongs to.

PageBreakID

New chapter-ID. This ID is shown in left top corner of the Comet groups and is used for page breaks in document reorganizings. All products with the same (or an empty) chapter ID are containing to the same chapter. Every change of the chapter ID forces a page break. Page template and page type are read from PageBreakTemplateID* and PageBreakType. Set the chapter ID in all frames of a Comet group. By default we use page UIDs as to be chapter IDs, but you may use any unique number here. Good candidates may be the Comet group ID or the UID of a frame of the list.

PageBreakTemplateID

Page template applied to the new page. You may use same page template as in the previous chapter.

PageBreakType

  • 0 : new left page

  • 1 : new page

  • 2 : new right page

PageBreakLayers

str

Layout layers for the chapter. Include all layers into double quotas and use single blanks as delimiters. The given layers must not exist in the document. Use the following definitions for variable layers

  • “ab++#–background” : All layers behind the current

  • “ab++#–except layerName” : All layers except layerName

  • “ab++#–behind layerName” : All layers behind layerName

RepetitionParent

int

UID of repetition parent. If the frame was not created as a repetition child, the value is 0.

LayoutRules

str

String for defining the layout rules.

StaticLink

int

Static product link property of place holder

BuildUsage

How should the frame be used in text flow builds?

  • 0 : Insert content

  • 1 : Insert frame as inline

  • 2 : Do not use

FunctionVariables

str

Function Variables

HashValues

Fixed contents of the placeholder

Publication selectors

Publication selectors are used in conjunction with the publication classes like CPublication and their functions like CPublication.getValue().

The following table indicates which selector can be used with the getValue function of each publication class.

Selector

Data type

CPublication

CPublicationType

CParameter

CPlanning

CWorkflowStatus

comet.constants.kPublicationID = 1

int

comet.constants.kPublicationID2 = 2

int

comet.constants.kPublicationID3 = 3

int

comet.constants.kPublicationStringID = 23

str

comet.constants.kPublicationInfo = 5

str

comet.constants.kPublicationName = 6

str

comet.constants.kPublicationLabel = 7

str

comet.constants.kPublicationType = 8

CParameter: int
else: str

comet.constants.kPublicationStatus = 9

str

comet.constants.kPublicationInfo1 = 10

str

comet.constants.kPublicationInfo2 = 11

str

comet.constants.kPublicationDomain = 12

str

comet.constants.kPublicationPath = 13

str

comet.constants.kPublicationURL = 14

str

comet.constants.kPublicationCanOverrideURL = 15

bool

comet.constants.kPublicationCanOverrideLocal = 16

bool

comet.constants.kPublicationHasChildren = 17

bool

comet.constants.kPublicationStatementID = 18

int

comet.constants.kPublicationIconID = 19

int

comet.constants.kPublicationValue1 = 20

str

comet.constants.kPublicationValue2 = 21

str

comet.constants.kPublicationValue3 = 22

str

comet.constants.kPublicationIdentifier = 24

str

comet.constants.kPublicationActionID = 25

str

comet.constants.kPublicationDocumentID = 26

str

comet.constants.kPublicationFieldCount = 27

int

comet.constants.kPublicationBucketID = 28

str

comet.constants.kPublicationBucketRefs = 29

list [str]

comet.constants.kPublicationContextAssortment = 30

str

comet.constants.kPublicationContextCountry = 31

str

comet.constants.kPublicationContextLanguage = 32

str

comet.constants.kPublicationContextWell = 33

str

comet.constants.kPublicationContextMarket = 34

str

comet.constants.kPublicationContextTargetGroup = 35

str

comet.constants.kPublicationContextPublication = 36

str

comet.constants.kPublicationContextDocumentID = 37

str

comet.constants.kPublicationCordRefs = 38

list [str]

comet.constants.kPublicationCreatedBy = 39

str

comet.constants.kPublicationCreatedOn = 40

str

comet.constants.kPublicationDeleted = 41

bool

comet.constants.kPublicationDpTemplateID = 42

str

comet.constants.kPublicationEntityBucketID = 43

str

comet.constants.kPublicationEntityModelID = 44

str

comet.constants.kPublicationEntityPlanningID = 45

str

comet.constants.kPublicationImportID = 48

int

comet.constants.kPublicationKeyValueRefs = 49

list [str]

comet.constants.kPublicationChildren = 51

list [str]

comet.constants.kPublicationMediaAssetRefs = 52

list [str]

comet.constants.kPublicationMetaData = 53

list [str]

comet.constants.kPublicationOrigin = 54

str

comet.constants.kPublicationPageID = 55

str

comet.constants.kPublicationPageTemplateElementID = 56

int

comet.constants.kPublicationPageTemplateID = 57

int

comet.constants.kPublicationParentPlanningID = 58

str

comet.constants.kPublicationPriceRefs = 59

list [str]

comet.constants.kPublicationPrintTemplateID = 60

int

comet.constants.kPublicationSequence = 61

int

comet.constants.kPublicationTableDataRefs = 62

list [str]

comet.constants.kPublicationTextRefs = 63

list [str]

comet.constants.kPublicationTimestamp = 64

str

comet.constants.kPublicationUpdatedBy = 65

str

comet.constants.kPublicationUpdatedOn = 66

str

comet.constants.kPublicationUsePrintPageTemplate = 67

bool

comet.constants.kPublicationVersion = 68

str

comet.constants.kPublicationXPosBottomRight = 69

float

comet.constants.kPublicationXPosTopLeft = 70

float

comet.constants.kPublicationYPosBottomRight = 71

float

comet.constants.kPublicationYPosTopLeft = 72

float

Document close modes

Used with CDocument.close()

comet.constants.kDocCloseProcess = 0
comet.constants.kDocCloseSchedule = 1
comet.constants.kDocCloseImmediate = 2
kDocCloseModes
{ 0: 'kDocCloseProcess',
  1: 'kDocCloseSchedule',
  2: 'kDocCloseImmediate'}

Color models

comet.constants.kColorModelUnknown = 0

Invalid model

comet.constants.kColorModelGray = 1

Monochrome

comet.constants.kColorModelRGB = 2

RGB

comet.constants.kColorModelCMYK = 3

CMYK

comet.constants.kColorModelLAB = 4

LAB

kColorModels
{ 0: 'kColorModelUnknown',
  1: 'kColorModelGray',
  2: 'kColorModelRGB',
  3: 'kColorModelCMYK',
  4: 'kColorModelLAB'}

Line types

comet.constants.kLineTypeRow = 0

Rows

comet.constants.kLineTypeColumn = 1

Columns

kLineTypes
{0: 'kLineTypeRow', 1: 'kLineTypeColumn'}

Row types

comet.constants.kRowTypeAll = 0

All rows

comet.constants.kRowTypeHeader = 1

Header rows

comet.constants.kRowTypeBody = 2

Body rows

comet.constants.kRowTypeFooter = 3

Footer rows

kRowTypes
{ 0: 'kRowTypeAll',
  1: 'kRowTypeHeader',
  2: 'kRowTypeBody',
  3: 'kRowTypeFooter'}

Stroke selectors

constants.kStrokeSideNone = 0
constants.kStrokeSideLeft = 1
constants.kStrokeSideTop = 2
constants.kStrokeSideRight = 4
constants.kStrokeSideBottom = 8
constants.kStrokeSideInteriorRows = 16
constants.kStrokeSideInteriorColumns = 32
constants.kStrokeSideAll = 63
kStrokeSelectors
{ 0: 'kStrokeSideNone',
  1: 'kStrokeSideLeft',
  2: 'kStrokeSideTop',
  4: 'kStrokeSideRight',
  8: 'kStrokeSideBottom',
  16: 'kStrokeSideInteriorRows',
  32: 'kStrokeSideInteriorColumns',
  63: 'kStrokeSideAll'}

Stroke attributes

constants.kStrokeAttrNone = 0
constants.kStrokeAttrWeight = 1
constants.kStrokeAttrColor = 2
constants.kStrokeAttrStrokeType = 4
constants.kStrokeAttrTint = 8
constants.kStrokeAttrOverprint = 16
constants.kStrokeAttrGapColor = 32
constants.kStrokeAttrGapTint = 64
constants.kStrokeAttrGapOverprint = 128
constants.kStrokeAttrAll = 255
constants.kStrokeAttrRGBColor = 256
constants.kStrokeAttrGapRGBColor = 257
kStrokeAttributes
{ 0: 'kStrokeAttrNone',
  1: 'kStrokeAttrWeight',
  2: 'kStrokeAttrColor',
  4: 'kStrokeAttrStrokeType',
  8: 'kStrokeAttrTint',
  16: 'kStrokeAttrOverprint',
  32: 'kStrokeAttrGapColor',
  64: 'kStrokeAttrGapTint',
  128: 'kStrokeAttrGapOverprint',
  255: 'kStrokeAttrAll',
  256: 'kStrokeAttrRGBColor',
  257: 'kStrokeAttrGapRGBColor'}

Stroke types

constants.kStrokeTypeNone = -1
constants.kStrokeTypeSolid = 0
constants.kStrokeTypeDashed = 1
constants.kStrokeTypeDash4X4 = 2
constants.kStrokeTypeDash3X2 = 3
constants.kStrokeTypeDots = 4
constants.kStrokeTypeWavy = 5
constants.kStrokeTypeStraightHash = 6
constants.kStrokeTypeRightSlant = 7
constants.kStrokeTypeLeftSlant = 8
constants.kStrokeTypeDiamond = 9
constants.kStrokeTypeJapaneseDots = 10
constants.kStrokeTypeThinThin = 11
constants.kStrokeTypeThinThick = 12
constants.kStrokeTypeThickThin = 13
constants.kStrokeTypeThickThick = 14
constants.kStrokeTypeThinThickThin = 15
constants.kStrokeTypeThickThinThick = 16
constants.kStrokeTypeTriple = 17
constants.kStrokeTypeTableStrip = 18
kStrokeTypes
{ -1: 'kStrokeTypeNone',
  0: 'kStrokeTypeSolid',
  1: 'kStrokeTypeDashed',
  2: 'kStrokeTypeDash4X4',
  3: 'kStrokeTypeDash3X2',
  4: 'kStrokeTypeDots',
  5: 'kStrokeTypeWavy',
  6: 'kStrokeTypeStraightHash',
  7: 'kStrokeTypeRightSlant',
  8: 'kStrokeTypeLeftSlant',
  9: 'kStrokeTypeDiamond',
  10: 'kStrokeTypeJapaneseDots',
  11: 'kStrokeTypeThinThin',
  12: 'kStrokeTypeThinThick',
  13: 'kStrokeTypeThickThin',
  14: 'kStrokeTypeThickThick',
  15: 'kStrokeTypeThinThickThin',
  16: 'kStrokeTypeThickThinThick',
  17: 'kStrokeTypeTriple',
  18: 'kStrokeTypeTableStrip'}

Product selectors

comet.constants.kProductID = 1

int

comet.constants.kProductID2 = 2

int

comet.constants.kProductID3 = 3

int

comet.constants.kProductPageitemID = 4

int

comet.constants.kProductDocID = 5

int

comet.constants.kProductMasterpage = 6

str

comet.constants.kProductGrid = 7

str

comet.constants.kProductGridID = 8

int

comet.constants.kProductElement = 9

str

comet.constants.kProductElementID = 10

int

comet.constants.kProductNeedsrequest = 11

int

comet.constants.kProductDefined = 12

int

comet.constants.kProductLevel = 13

int

comet.constants.kProductSubstatement = 14

int

comet.constants.kProductClassID = 15

int

comet.constants.kProductRow1 = 16

str

comet.constants.kProductRow2 = 17

str

comet.constants.kProductPreRuleID = 18

int

comet.constants.kProductPreRuleparams = 19

str

comet.constants.kProductPostRuleID = 20

int

comet.constants.kProductPostRuleparams = 21

str

comet.constants.kProductAdparams = 22

str

comet.constants.kProductStringID = 23

str

comet.constants.kProductSnippetAttr = 24

str

comet.constants.kProductProductTextmodel = 25

Unused

comet.constants.kProductProductStart = 26

int

comet.constants.kProductProductEnd = 27

int

comet.constants.kProductProductType = 28

int

comet.constants.kProductProductLayer = 29

Unused

comet.constants.kProductProductTagID1 = 30

int

comet.constants.kProductProductTagID2 = 31

int

comet.constants.kProductProductPageType = 32

int

comet.constants.kProductProductOriginals = 33

Unused

comet.constants.kProductProductUsedPageitem = 34

Unused

comet.constants.kProductProductDocPosition = 37

int

comet.constants.kProductProductToDelete = 38

int

kProductSelectors
{ 1: 'kProductID',
  2: 'kProductID2',
  3: 'kProductID3',
  4: 'kProductPageitemID',
  5: 'kProductDocID',
  6: 'kProductMasterpage',
  7: 'kProductGrid',
  8: 'kProductGridID',
  9: 'kProductElement',
  10: 'kProductElementID',
  11: 'kProductNeedsrequest',
  12: 'kProductDefined',
  13: 'kProductLevel',
  14: 'kProductSubstatement',
  15: 'kProductClassID',
  16: 'kProductRow1',
  17: 'kProductRow2',
  18: 'kProductPreRuleID',
  19: 'kProductPreRuleparams',
  20: 'kProductPostRuleID',
  21: 'kProductPostRuleparams',
  22: 'kProductAdparams',
  23: 'kProductStringID',
  24: 'kProductSnippetAttr',
  25: 'kProductProductTextmodel',
  26: 'kProductProductStart',
  27: 'kProductProductEnd',
  28: 'kProductProductType',
  29: 'kProductProductLayer',
  30: 'kProductProductTagID1',
  31: 'kProductProductTagID2',
  32: 'kProductProductPageType',
  33: 'kProductProductOriginals',
  34: 'kProductProductUsedPageitem',
  37: 'kProductProductDocPosition',
  38: 'kProductProductToDelete'}

Product build flags

comet.constants.kUseDefaultGrid = 2
comet.constants.kIgnoreIncompletePlacements = 4
comet.constants.kAllowIncompletePlacements = 8
comet.constants.kCheckIfNotExists = 16
comet.constants.kShowErrors = 32
comet.constants.kIntersectionsAllowed = 64
comet.constants.kCheckGridElementSize = 128
comet.constants.kUseFullPage = 256
comet.constants.kDisableOptimizing = 512
comet.constants.kPreferDefaultPageItem = 4096
comet.constants.kSuppressAutoExtent = 8192
comet.constants.kUseBleed = 524288
comet.constants.kExpandGroups = 16384
comet.constants.kAutoDetectType = 32768
comet.constants.kInsertTextBeforeExceptFirst = 2097152
comet.constants.kInsertTextAfterExceptLast = 4194304
comet.constants.kShowProgress = 65536
comet.constants.kSuppressShowErrors = 131072
comet.constants.kAllowDoublers = 1048576
comet.constants.kReloadAll = 4194304
comet.constants.kSkipEmptyTemplates = 8388608
comet.constants.kSuppressAlerts = 134217728
comet.constants.kIgnoreErrors = 268435456
comet.constants.kPreferExistingPages = 536870912
comet.constants.kPreferProductPT = 1073741824
comet.constants.kLoadMasterItems = 2147483648
kBuildFlags
{ 2: 'kUseDefaultGrid',
  4: 'kIgnoreIncompletePlacements',
  8: 'kAllowIncompletePlacements',
  16: 'kCheckIfNotExists',
  32: 'kShowErrors',
  64: 'kIntersectionsAllowed',
  128: 'kCheckGridElementSize',
  256: 'kUseFullPage',
  512: 'kDisableOptimizing',
  4096: 'kPreferDefaultPageItem',
  8192: 'kSuppressAutoExtent',
  524288: 'kUseBleed',
  16384: 'kExpandGroups',
  32768: 'kAutoDetectType',
  2097152: 'kInsertTextBeforeExceptFirst',
  4194304: 'kReloadAll',
  65536: 'kShowProgress',
  131072: 'kSuppressShowErrors',
  1048576: 'kAllowDoublers',
  8388608: 'kSkipEmptyTemplates',
  134217728: 'kSuppressAlerts',
  268435456: 'kIgnoreErrors',
  536870912: 'kPreferExistingPages',
  1073741824: 'kPreferProductPT',
  2147483648: 'kLoadMasterItems'}

Excel cell types

comet.constants.kExcelCellTypeError = 0

Error

comet.constants.kExcelCellTypeNumber = 1

Number (int or float)

comet.constants.kExcelCellTypeText = 3

Text

comet.constants.kExcelCellTypeBoolean = 4

Boolean

comet.constants.kExcelCellTypeDateTime = 5

Datetime

comet.constants.kExcelCellTypeBlank = 6

Blank, the cell contains only format information

comet.constants.kExcelCellTypeEmpty = 7

Empty, the cell doesn’t exist

kExcelCellTypes
{ 0: 'kExcelCellTypeError',
  1: 'kExcelCellTypeNumber',
  3: 'kExcelCellTypeText',
  4: 'kExcelCellTypeBoolean',
  5: 'kExcelCellTypeDateTime',
  6: 'kExcelCellTypeBlank',
  7: 'kExcelCellTypeEmpty'}

Excel selectors

comet.constants.kExcelBorderLeft = 0

Left border

comet.constants.kExcelBorderTop = 1

Top border

comet.constants.kExcelBorderRight = 2

Right border

comet.constants.kExcelBorderBottom = 3

Bottom border

comet.constants.kExcelBorderDiagonal = 4

Bottom border

comet.constants.kExcelPatternForeground = 5

Foreground pattern

comet.constants.kExcelPatternBackground = 6

Background pattern

kExcelSelectors
{ 0: 'kExcelBorderLeft',
  1: 'kExcelBorderTop',
  2: 'kExcelBorderRight',
  3: 'kExcelBorderBottom',
  4: 'kExcelBorderDiagonal',
  5: 'kExcelPatternForeground',
  6: 'kExcelPatternBackground'}

Excel border styles

comet.constants.kExcelBorderStyleError = -1

Not set or error

comet.constants.kExcelBorderStyleNone = 0

BORDERSTYLE_NONE

comet.constants.kExcelBorderStyleThin = 1

BORDERSTYLE_THIN

comet.constants.kExcelBorderStyleMedium = 2

BORDERSTYLE_MEDIUM

comet.constants.kExcelBorderStyleDashed = 3

BORDERSTYLE_DASHED

comet.constants.kExcelBorderStyleDotted = 4

BORDERSTYLE_DOTTED

comet.constants.kExcelBorderStyleThick = 5

BORDERSTYLE_THICK

comet.constants.kExcelBorderStyleDouble = 6

BORDERSTYLE_DOUBLE

comet.constants.kExcelBorderStyleHair = 7

BORDERSTYLE_HAIR

comet.constants.kExcelBorderStyleMediumDashed = 8

BORDERSTYLE_MEDIUMDASHED

comet.constants.kExcelBorderStyleDashdot = 9

BORDERSTYLE_DASHDOT

comet.constants.kExcelBorderStyleMediumDashdot = 10

BORDERSTYLE_MEDIUMDASHDOT

comet.constants.kExcelBorderStyleDashDotDot = 11

BORDERSTYLE_DASHDOTDOT

comet.constants.kExcelBorderStyleMediumDashDotDot = 12

BORDERSTYLE_MEDIUMDASHDOTDOT

comet.constants.kExcelBorderStyleSlantDashDot = 13

BORDERSTYLE_SLANTDASHDOT

kExcelBorderStyles
{ -1: 'kExcelBorderStyleError',
  0: 'kExcelBorderStyleNone',
  1: 'kExcelBorderStyleThin',
  2: 'kExcelBorderStyleMedium',
  3: 'kExcelBorderStyleDashed',
  4: 'kExcelBorderStyleDotted',
  5: 'kExcelBorderStyleThick',
  6: 'kExcelBorderStyleDouble',
  7: 'kExcelBorderStyleHair',
  8: 'kExcelBorderStyleMediumDashed',
  9: 'kExcelBorderStyleDashdot',
  10: 'kExcelBorderStyleMediumDashdot',
  11: 'kExcelBorderStyleDashDotDot',
  12: 'kExcelBorderStyleMediumDashDotDot',
  13: 'kExcelBorderStyleSlantDashDot'}

Excel underline styles

comet.constants.kExcelUnderlineNone = 0
comet.constants.kExcelUnderlineSingleAbove = 1
comet.constants.kExcelUnderlineDoubleAbove = 2
comet.constants.kExcelUnderlineSingleBelow = 3
comet.constants.kExcelUnderlineDoubleBelow = 4
kExcelUnderlineStyles
{ 0: 'kExcelUnderlineNone',
  1: 'kExcelUnderlineSingleAbove',
  2: 'kExcelUnderlineDoubleAbove',
  3: 'kExcelUnderlineSingleBelow',
  4: 'kExcelUnderlineDoubleBelow'}

Excel font positions

comet.constants.kExcelPositionNormal = 1

Normal

comet.constants.kExcelPositionSuper = 2

Superscript

comet.constants.kExcelPositionSub = 3

Subscript

kExcelPositions
{ 1: 'kExcelPositionNormal',
  2: 'kExcelPositionSuper',
  3: 'kExcelPositionSub'}

Magnet situations

comet.constants.kMagnetsNone = 0

No situation

comet.constants.kMagnetsPlaceholder = 1

After placeholder loading

comet.constants.kMagnetsScript = 2

Calls to frame::apply_magnets

comet.constants.kMagnetsBuildProducts = 4

Product build and reorganization

comet.constants.kMagnetsToDoList = 8

Updating using the ToDo list panel

comet.constants.kMagnetsChangeTemplate = 16

Template change

comet.constants.kMagnetsLayoutRule = 32

Layout rule ‘Update magnet distances’

comet.constants.kMagnetsAll = 4294967295

All situations

kMagnetSituations
{ 0: 'kMagnetsNone',
  1: 'kMagnetsPlaceholder',
  2: 'kMagnetsScript',
  4: 'kMagnetsBuildProducts',
  8: 'kMagnetsToDoList',
  16: 'kMagnetsChangeTemplate',
  32: 'kMagnetsLayoutRule',
  4294967295: 'kMagnetsAll'}

Magnet states

comet.constants.kMagnetsEnable = 1
comet.constants.kMagnetsDisable = 0
comet.constants.kMagnetsToggle = -1
kMagnetStates
{1: 'kMagnetsEnable', 0: 'kMagnetsDisable', -1: 'kMagnetsToggle'}

Swatch types

comet.constants.kSwatchTypeNone = 0
comet.constants.kSwatchTypeBaseColor = 1
comet.constants.kSwatchTypeTintColor = 2
comet.constants.kSwatchTypeMixedInkColor = 3
comet.constants.kSwatchTypeLinkedMixedInkColor = 4
comet.constants.kSwatchTypeMixedInkParent = 5
comet.constants.kSwatchTypeGradient = 6
comet.constants.kSwatchTypeBlackBoxPaint = 7
comet.constants.kSwatchTypeOther = 8
kSwatchTypes
{ 0: 'kSwatchTypeNone',
  1: 'kSwatchTypeBaseColor',
  2: 'kSwatchTypeTintColor',
  3: 'kSwatchTypeMixedInkColor',
  4: 'kSwatchTypeLinkedMixedInkColor',
  5: 'kSwatchTypeMixedInkParent',
  6: 'kSwatchTypeGradient',
  7: 'kSwatchTypeBlackBoxPaint',
  8: 'kSwatchTypeOther'}

Swatch spaces

comet.constants.kSwatchSpaceInvalid = 0
comet.constants.kSwatchSpaceFromDisk = 1
comet.constants.kSwatchSpaceEmbeddedInImage = 2
comet.constants.kSwatchSpaceEmbeddedInDocument = 3
comet.constants.kSwatchSpaceGray = 4
comet.constants.kSwatchSpaceRGB = 5
comet.constants.kSwatchSpaceCMYK = 6
comet.constants.kSwatchSpaceLAB = 7
comet.constants.kSwatchSpaceVirtual = 8
kSwatchSpaces
{ 0: 'kSwatchSpaceInvalid',
  1: 'kSwatchSpaceFromDisk',
  2: 'kSwatchSpaceEmbeddedInImage',
  3: 'kSwatchSpaceEmbeddedInDocument',
  4: 'kSwatchSpaceGray',
  5: 'kSwatchSpaceRGB',
  6: 'kSwatchSpaceCMYK',
  7: 'kSwatchSpaceLAB',
  8: 'kSwatchSpaceVirtual'}

Cell types

comet.constants.kCellTypeText = 1

Text cell

comet.constants.kCellTypeGraphic = 2

Graphic cell

kCellTypes
{1: 'kCellTypeText', 2: 'kCellTypeGraphic'}

Overprint settings

comet.constants.kOverprintBasic = 0

All

comet.constants.kOverprintStroke = 1

Stroke

comet.constants.kOverprintFill = 2

Stroke

comet.constants.kOverprintGap = 3

Gap of stroke

kOverprintSettings
{ 0: 'kOverprintBasic',
  1: 'kOverprintStroke',
  2: 'kOverprintFill',
  3: 'kOverprintGap'}

Snippet match settings

comet.constants.kSnippetsNever = 0

No, don’t use snippets

comet.constants.kSnippetMatchesProduct = 1

Yes, if products match

comet.constants.kSnippetMatchesTemplate = 2

Yes, if templates match

comet.constants.kSnippetMatchesDocument = 4

Yes, if documents match

comet.constants.kSnippetMatchesStrict = 55
comet.constants.kSnippetMatchesTolerant = 3
comet.constants.kSnippetFallbackToTemplate = 8

If the snippet doesn’t fit the page element, use original template instead.

comet.constants.kSnippetMatchesLayer = 16

Yes, if layers match

comet.constants.kSnippetMatchesContext = 32

Yes, if the contexts match

comet.constants.kSnippetMatchesExactly = 51
comet.constants.kSnippetAcceptAnyMatch = 64
comet.constants.kSnippetCreate = 128

Create non existing snippets on the fly

kSnippetMatching
{ 0: 'kSnippetsNever',
  1: 'kSnippetMatchesProduct',
  2: 'kSnippetMatchesTemplate',
  4: 'kSnippetMatchesDocument',
  55: 'kSnippetMatchesStrict',
  3: 'kSnippetMatchesTolerant',
  8: 'kSnippetFallbackToTemplate',
  16: 'kSnippetMatchesLayer',
  32: 'kSnippetMatchesContext',
  51: 'kSnippetMatchesExactly',
  64: 'kSnippetAcceptAnyMatch',
  128: 'kSnippetCreate'}

Page info

comet.constants.kPageInfoActivated = 1

bool

Active?

comet.constants.kPageInfoID = 2

int

ID of the page template. When setting this attribute, the correct page template for the page type is used

comet.constants.kPageInfoIDs = 1021

int

When changing the template for one page, all subsequent pages of the document will be changed according to the settings in the template.

Otherwise like kPageInfoID.

comet.constants.kPageInfoName = 3

str

Name of the page template.

comet.constants.kPageInfoPageType = 4

int

Page type of the page template.

  • 0: Unisex

  • 1: Left

  • 2: Right

comet.constants.kPageInfoBarrierType = 5

int

ID of after apply script

comet.constants.kPageInfoSuccessorID = 6

int

comet.constants.kPageInfoMasterpages = 7

list[str]

comet.constants.kPageInfoAutoOpposite = 8

bool

comet.constants.kPageInfoAutoSuccessor = 9

bool

comet.constants.kPageInfoOppositeID = 10

int

comet.constants.kPageInfoDocu = 11

str

comet.constants.kPageInfoDirection = 12

int

comet.constants.kPageInfoOrigin = 13

int

UID of the page in the master document.

The information is only required in Master-Variant Syncs.

comet.constants.kPageInfoBkLayers = 1022

list[str]

kPageInfo
{ 1: 'kPageInfoActivated',
  2: 'kPageInfoID',
  1021: 'kPageInfoIDs',
  3: 'kPageInfoName',
  4: 'kPageInfoPageType',
  5: 'kPageInfoBarrierType',
  6: 'kPageInfoSuccessorID',
  7: 'kPageInfoMasterpages',
  8: 'kPageInfoAutoOpposite',
  9: 'kPageInfoAutoSuccessor',
  10: 'kPageInfoOppositeID',
  11: 'kPageInfoDocu',
  12: 'kPageInfoDirection',
  13: 'kPageInfoOrigin',
  1022: 'kPageInfoBkLayers'}

Horizontal Justification

comet.constants.kJustifyLeft = 0

Justify left

comet.constants.kJustifyRight = 1

Justify right

comet.constants.kJustifyCenter = 2

Justify center

comet.constants.kJustifyFullLastLineLeft = 3

Justify full, last line left

comet.constants.kJustifyFullLastLineRight = 4

Justify full, last line right

comet.constants.kJustifyFullLastLineCenter = 5

Justify full, last line center

comet.constants.kJustifyFullLastLineFull = 6

Justify full, last line full

kHorizontalJustification
{ 0: 'kJustifyLeft',
  1: 'kJustifyRight',
  2: 'kJustifyCenter',
  3: 'kJustifyFullLastLineLeft',
  4: 'kJustifyFullLastLineRight',
  5: 'kJustifyFullLastLineCenter',
  6: 'kJustifyFullLastLineFull'}

Table column compression

comet.constants.kBroadenFirstLast = 1

Shrink columns to their minimum before rebuilding table, broaden columns to fit the text frame after rebuilding

comet.constants.kBroadenFirst = 0

Shrink columns to their minimum before rebuilding table

comet.constants.kBroadenLast = 2

Broaden columns to fit the text frame after rebuilding

comet.constants.kBroadenNever = 3

Leave the column widths untouched

kTableColumnCompression
{ 1: 'kBroadenFirstLast',
  0: 'kBroadenFirst',
  2: 'kBroadenLast',
  3: 'kBroadenNever'}

Wrap types

comet.constants.kWrapUndef = -1

Not defined/Leave unchanged

comet.constants.kWrapNone = 0

No effect on text

comet.constants.kWrapBand = 1

Text leads past area of strip

comet.constants.kWrapNextFrame = 2

Txt continues in next frame

comet.constants.kWrapBothSides = 3

Text on both sides of object

comet.constants.kWrapWithinHoles = 4

Text within holes in object

comet.constants.kWrapAutoContour = 5

Text follows the shape (implies kWrapBothSides)

comet.constants.kWrapManualContour = 6

Text follows the standoff shape (implies kWrapBothSides)

comet.constants.kWrapLeftContour = 7

Text wraps only to the left side of the standoff

comet.constants.kWrapRightContour = 8

Text wraps only to the right side of the standoff

kWrapTypes
{ -1: 'kWrapUndef',
  0: 'kWrapNone',
  1: 'kWrapBand',
  2: 'kWrapNextFrame',
  3: 'kWrapBothSides',
  4: 'kWrapWithinHoles',
  5: 'kWrapAutoContour',
  6: 'kWrapManualContour',
  7: 'kWrapLeftContour',
  8: 'kWrapRightContour'}

Page template attributes

comet.constants.kPageTemplateActive = 0

Value type: bool

Whether the page template is active.

comet.constants.kPageTemplateID = 1

Value type: int

The ID of the page template.

comet.constants.kPageTemplateIDs = 2

Value type: int

When changing the template for a page, all subsequent pages of the document are changed according to the settings in the template. Otherwise the same as kPageTemplateID.

comet.constants.kPageTemplateName = 3

Value type: str

The name of the page template.

comet.constants.kPageTemplatePageType = 4

Value type: int

The type of the page template.

Possible values:
  • 0: Any

  • 1: Left page

  • 2: Right page

comet.constants.kPageTemplateBarrier = 5

Value type: int

ID of the script to be executed after applying the page template.

comet.constants.kPageTemplateSuccessor = 6

Value type: int

The successor template.

comet.constants.kPageTemplateMasterPages = 7

Value type: str

Comma-separated list of master pages.

comet.constants.kPageTemplateAutoOpposite = 8

Value type: bool

comet.constants.kPageTemplateAutoSuccessor = 9

Value type: bool

comet.constants.kPageTemplateOpposite = 10

Value type: int

Opposing template.

comet.constants.kPageTemplateOrigin = 11

Value type: int

UID of the page in the master document.

The information is only required in master-variant syncs.

comet.constants.kPageTemplateLabel = 12

Value type: str

The label of the template.

comet.constants.kPageTemplateDocName = 13

Value type: str

The name of the template document.

comet.constants.kPageTemplateOwner = 14

Value type: int

ID of the template file containing this information.

kPageTemplateAttributes
{ 0: 'kPageTemplateActive',
  1: 'kPageTemplateID',
  2: 'kPageTemplateIDs',
  3: 'kPageTemplateName',
  4: 'kPageTemplatePageType',
  5: 'kPageTemplateBarrier',
  6: 'kPageTemplateSuccessor',
  7: 'kPageTemplateMasterPages',
  8: 'kPageTemplateAutoOpposite',
  9: 'kPageTemplateAutoSuccessor',
  10: 'kPageTemplateOpposite',
  11: 'kPageTemplateOrigin',
  12: 'kPageTemplateLabel',
  13: 'kPageTemplateDocName',
  14: 'kPageTemplateOwner'}

Page element attributes

comet.constants.kPageElementName = 0

Value type: str

Page element name.

comet.constants.kPageElementUID = 1

Value type: int

UID of the element in the associated InDesign® document.

comet.constants.kPageElementActive = 2

Value type: bool

Whether the page element is active.

comet.constants.kPageElementSequ = 3

Value type: int

Sequence number of the element.

comet.constants.kPageElementType = 4

Value type: int

Value type: bool

comet.constants.kPageElementVerticalJust = 6

Value type: bool

comet.constants.kPageElementMinimumVJ = 7

Value type: int

comet.constants.kPageElementStylesVJ = 8

Value type: int

comet.constants.kPageElementMinimumVJEnabled = 9

Value type: bool

comet.constants.kPageElementStylesVJEnabled = 10

Value type: bool

comet.constants.kPageElementHasMoreObjects = 11

Value type: bool

comet.constants.kPageElementBuildDirection = 12

Value type: int

Build direction.

comet.constants.kPageElementMinDistX = 13

Value type: float

For 1:N elements, minimum X distance in points.

comet.constants.kPageElementMinDistY = 14

Value type: float

For 1:N elements, minimum Y distance in points.

comet.constants.kPageElementJustificationEnabled = 15

Value type: bool

comet.constants.kPageElementJustification = 16

Value type: int

comet.constants.kPageElementJustificationScript = 17

Value type: int

comet.constants.kPageElementBBoxLeft = 18

Value type: float

comet.constants.kPageElementBBoxTop = 19

Value type: float

comet.constants.kPageElementBBoxRight = 20

Value type: float

comet.constants.kPageElementBBoxBottom = 21

Value type: float

kPageElementAttributes
{ 0: 'kPageElementName',
  1: 'kPageElementUID',
  2: 'kPageElementActive',
  3: 'kPageElementSequ',
  4: 'kPageElementType',
  5: 'kPageElementAutoLink',
  6: 'kPageElementVerticalJust',
  7: 'kPageElementMinimumVJ',
  8: 'kPageElementStylesVJ',
  9: 'kPageElementMinimumVJEnabled',
  10: 'kPageElementStylesVJEnabled',
  11: 'kPageElementHasMoreObjects',
  12: 'kPageElementBuildDirection',
  13: 'kPageElementMinDistX',
  14: 'kPageElementMinDistY',
  15: 'kPageElementJustificationEnabled',
  16: 'kPageElementJustification',
  17: 'kPageElementJustificationScript',
  18: 'kPageElementBBoxLeft',
  19: 'kPageElementBBoxTop',
  20: 'kPageElementBBoxRight',
  21: 'kPageElementBBoxBottom'}