comet¶
The comet module is the primary service provider for comet related functionality
Methods¶
- comet.getContext()¶
Fetches the script context in which this script is called. Depending on the type of action, scripts can be reused for multiple situations (e.g. different placeholder calls can use the same action like placeholder load and placeholder sync).
- comet.getVersion()¶
Determine the current comet version.
- Returns
The comet version
- Return type
- Available
- comet.getRevision()¶
Determine the current comet revision.
- Returns
The comet revision
- Return type
- Available
- comet.setOutput(identifier, value)¶
Set an output variable depending on the active context. This function is used to provide comet with necessary information in callback contexts. e.g. when dynamically defining function variables it is necessary to fill the variable ‘gFuncVars’ with a predefined data structure to provide comet with the necessary information to properly establish the function variables.
The type of the output variable value is dynamic and depends on the context and variable. For a table of output variables and their types by context, see Output variables
- Parameters
identifier (str) – The variable identifier. Must match a variable available in the context.
value – The new variable value. Must match the variable type required in this context.
- Returns
None
- Raises
When parameter types are invalid
When parameter type of value does not match the required type
CometError – On internal error
- Available
- comet.getKeyValue(key, frame=None, index=0, length=- 1)¶
Query the value of a keyword.
In placeholder scripts with direct statements and in panel statements a number of <tags> are defined which are replaced with their current values before the statement is executed.
A complete list of these tags can be found here.
In scripts, you can ask for these values directly in a number of ways. To simplify matters, this function can be used to obtain the values in a uniform manner.
- Parameters
key (str) – The key to query, without pointed brackets
frame (CFrame) –
Associated frame. For frame-independent keys like ‘now’ or ‘user’ the parameter is is not needed.
None
: Use gFrame when available
index (int) –
Character index in the text to query the value.
The parameter is only needed for text-related keys like ‘text’.
length (int) –
Character length in the text to query the value.
The parameter is only needed for text-related keys like ‘text’.
- Returns
The resolved value
- Return type
- Raises
TypeError – When parameter types are invalid
CometError – On internal error
- CScript
- comet.wlog(message, targetFile='', addNewLine=True)¶
Write a message to the logfile
- Parameters
- Returns
None
- Raises
TypeError – When parameter types are invalid
- Available
- CScript
- comet.wtlog(message, targetFile='', addNewLine=True)¶
Write a message to the logfile with the current time as prefix in the format dd.mm.yyyy hh:mm:ss, e.g.
30.06.2021 14:13:47
- Parameters
- Returns
None
- Raises
TypeError – When parameter types are invalid
- Available
- CScript
- comet.showMessage(message)¶
Display a message dialog. The message automatically is translated according to translation tables.
Outputs a message to the console instead of showing a dialog
- comet.showError(message)¶
Display an error dialog. The message automatically is translated according to translation tables.
Outputs a message to the console instead of showing a dialog
- comet.uncurtain(input)¶
Uncurtain all available $-keys in the given string. $-keys are not only the standards $HOME, $DESKTOP, $DOCUMENTS, $PREFS, $PLUGINS, $COMET, $CACHE and $COMETDATA, but also all activated aliases defined in the Settings panel.
- comet.pyImport(path)¶
Try to import a module from a comet datapool where the path may contain special import tokens which are dynamically resolved to the current data connection.
See Import directives for details
- Parameters
path (str) – The path in comet import directive syntax
- Returns
The imported module
- Return type
Module
- Raises
TypeError – When parameter types are invalid
ImportError – When import could not be done
- Available
- comet.mm2pt(value)¶
Converts a value from milimeters to pt.
- comet.pt2mm(value)¶
Converts a value from pt to milimeters.
- comet.inch2pt(value)¶
Converts a value from inch to pt.
- comet.pt2inch(value)¶
Converts a value pt to inch.
- comet.translate(value, findKey=False)¶
Try to translate the input value by looking up the internal translation tables. When findKey is True, the value is considered already translated and the search tries to find the translation key. Current locale of the host software applies.
- Parameters
- Returns
The translated value. Returns the same as value when value was not found in translation tables
- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter value is empty
- Available
- comet.isShiftKeyPressed()¶
Is the shift pressed?
- comet.isAltKeyPressed()¶
Is the alt key pressed?
- comet.isCtrlKeyPressed()¶
Is the control key pressed?
- Returns
Whether the alt key is pressed
- Return type
- Available
- CScript
- comet.runJavaScript(input, isPath=False, showErrors=False, flags=0, items=[])¶
Run a JavaScript (Extendscript).
For additional information see Calling other scripts
- Parameters
input (str) –
Either the complete script text as a string, or a full path to a file containing the script.
When the parameter is a path, set isPath to True.
If the parameter is a path, the file is expected to be UTF-8 encoded!
isPath (bool) –
showErrors (bool) –
Show error dialogs on script errors?
flags (int) –
The undo behavior of the script:
0: Each script statement gets a separate undo step.
- 2: Push the entire script as a single regular undo step.
If an error occurs, roll back to the beginning of the script request that generated the error.
- 4: Similar to 2, however faster because we don’t snapshot each script request.
If an error occurs, we roll back to the beginning of the entire script.
6: Push the entire script as a single auto-undoable step.
items (list) –
Objects which are converted to global variables in your JavaScript, see Calling other scripts.
This parameter creates JavaScript variables named gItemRef1, gItemRef2, etc..
When these objects are inside a document or are documents themselves, they also create the according document variables gDocRef1, gDocRef2, etc..
Furthermore, two global arrays names gItemRefs and gDocRefs are created containing all objects. The ItemRefs are being converted to their appropriate JavaScript objects.The following table shows all supported object types:
- Returns
The value returned by the script itself.
The value is always is converted to
str
- if you need another return type you will have to convert it yourself.- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter input is empty
FileNotFoundError – When parameter isPath is True and input does not point to an existing file
On internal error
When the script fails
- Available
- CScript
- comet.runCScript(input, isPath=False, showErrors=False, items=[], logExecution=False)¶
Run a CScript.
For additional information see Calling other scripts
- Parameters
input (str) –
Either the complete script text as a string, or a full path to a file containing the script.
When the parameter is a path, set isPath to
True
.If the parameter is a path, the file is expected to be UTF-8 encoded!
isPath (bool) –
showErrors (bool) –
Show error dialogs on script errors?
items (list) –
Objects which are converted to global variables in your CScript, see Calling other scripts.
For each entry in this list, a global variable in the executed CScript is created. These variables are accessible in your CScript like intrinsic global variables (gFrame etc…).
Entries can be:- type
Variable type.
In this case an automatic name is generated starting with gItemRef1 and counting upwards: gItemRef2, … gItemRefN.
For a complete list of all supported variable types, see Calling other scripts.
The variable values do not change, even if they are changed in CScript.e.g. an input variable of type
list
[str
] which is converted to a StringList in CScript and manipulated there, remains unchanged in Python.
The variables must not be released in your CScript!logExecution (bool) – Write to log that a script is being executed, including script name, ID, execution time etc…
- Returns
The return value of the main function of the script
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input is empty
When parameter items contains a tuple with an empty name
FileNotFoundError – When parameter isPath is True and input does not point to an existing file.
On internal error
When the script fails
- Available
- comet.getScriptClipboard(key)¶
Get a value from the script clipboard.
A copy of the value is returned, not the value itself.
For more information about supported data types, the script stack, the script clipboard and the stored values see here .
- Parameters
key (str) – The key to fetch the value for.
- Returns
The found value
- Raises
TypeError – When parameter types are invalid.
ValueError – When parameter key is empty.
KeyError – When the clipboard does not contain an entry for key.
- Available
- CScript
- comet.setScriptClipboard(key, value, autoDelete=True)¶
Set a value in the script clipboard.
When the key already exists it is overwritten.
A copy of the value is stored, not the value itself.
For more information about supported data types, the script stack, the script clipboard and the stored values see here .
- Parameters
- Return type
- Raises
TypeError – When parameter types are invalid.
ValueError – When parameter key is empty.
- Available
- CScript
Constants¶
The comet
module has a number of constant members which are either used as convenience values for function parameter calls, or as returned values.
Host environments¶
|
|
|
|
kHosts{ 0: 'kHostInDesign',
1: 'kHostInDesignServer',
2: 'kHostCometPDF',
3: 'kHostIllustrator'}
|
Designate¶
|
|
|
|
|
|
kDesignate{ 0: 'kDesignateUndef',
1: 'kDesignateCursor',
2: 'kDesignateSelected',
3: 'kDesignateDocument',
-1: 'kDesignateVisibleLayers',
-2: 'kDesignateActiveLayer'}
|
Contexts¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
kActionTypes{ 1: 'kActionTypeLoad',
2: 'kActionTypeStore',
3: 'kActionTypeSync',
4: 'kActionTypeBuild'}
|
Indices¶
|
|
|
kIndices{0: 'kStart', -1: 'kEnd'}
|
Sides¶
|
|
|
|
|
kSides{ 0: 'kSideNone',
1: 'kSideLeft',
4: 'kSideRight',
2: 'kSideTop',
8: 'kSideBottom',
15: 'kSideAll'}
|
Reference Points¶
|
|
|
|
|
|
|
|
|
kReferencePoints{ 0: 'kRefPointTopLeft',
1: 'kRefPointTopCenter',
2: 'kRefPointTopRight',
3: 'kRefPointLeftCenter',
4: 'kRefPointCenter',
5: 'kRefPointRightCenter',
6: 'kRefPointBottomLeft',
7: 'kRefPointBottomCenter',
8: 'kRefPointBottomRight'}
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
|
|
|
|
kPageItemTypes{ -1: 'kPageItemTypeUnknown',
0: 'kPageItemTypeText',
1: 'kPageItemTypeGraphic',
2: 'kPageItemTypeGroup',
3: 'kPageItemTypeLegacyText',
4: 'kPageItemTypeGraph',
5: 'kPageItemTypeGuide',
6: 'kPageItemTypeQRCode'}
|
List types¶
|
|
|
kListTypes{0: 'kListTypeNone', 1: 'kListTypeBullet', 2: 'kListTypeNumbered'}
|
Basic types¶
|
|
|
kBasicTypes{1: 'kInt', 2: 'kFloat', 3: 'kString'}
|
Layout rule situations¶
|
|
|
|
|
|
kLayoutRuleSituations{ 1: 'kLayoutRuleSituationCreate',
2: 'kLayoutRuleSituationLoad',
4: 'kLayoutRuleSituationReorganize',
8: 'kLayoutRuleSituationGeometryChange',
32: 'kLayoutRuleSituationBuild',
4294967295: 'kLayoutRuleSituationAll'}
|
Style types¶
|
|
|
|
|
kStyleTypes{ 1: 'kStyleTypeObject',
2: 'kStyleTypeTable',
3: 'kStyleTypeCell',
4: 'kStyleTypeParagraph',
5: 'kStyleTypeCharacter'}
|
Page types¶
|
|
|
|
kPageTypes{ -1: 'kPageTypeUnknown',
0: 'kPageTypeLeft',
1: 'kPageTypeUnisex',
2: 'kPageTypeRight'}
|
Panel IDs¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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'}
|
Sync states¶
|
|
|
|
|
|
|
|
|
kSyncStates{ -6: 'kSyncStateUndefined',
-5: 'kSyncStateOverridden',
-4: 'kSyncStateLoadError',
-3: 'kSyncStateNoMarker',
-2: 'kSyncStateNotFound',
-1: 'kSyncStateChanged',
0: 'kSyncStateRemoved',
1: 'kSyncStateOk',
2: 'kSyncStateNotUnique'}
|
Build situations¶
|
|
|
|
|
|
|
|
kBuildSituations{ 1: 'kSituationCheckSizeBefore',
2: 'kSituationCheckSizeAfter',
3: 'kSituationBeforeCreateContinue',
4: 'kSituationAfterCreateContinue',
5: 'kSituationProductPlaced',
6: 'kSituationUnsolvableOversets',
20: 'kSituationAfterBuild',
21: 'kSituationProductFinished'}
|
Link types¶
|
|
kLinkTypes{0: 'kLinkTypeText', 1: 'kLinkTypeFrame'}
|
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 :
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 :
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.
See
CFrame.getSmartItemData() and CFrame.setSmartItemData() for more information.`
|
||||||||||||||||
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 |
|
|||||||||||||||||
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
|
||||||||||||||||
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?
|
|||||||||||||||||
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 |
|||||
---|---|---|---|---|---|---|
|
✓ |
✗ |
✗ |
✓ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✓ |
✓ |
✗ |
✓ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✓ |
✓ |
✓ |
✓ |
|
|
|
✓ |
✗ |
✓ |
✗ |
✓ |
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✗ |
✗ |
✓ |
✗ |
✗ |
|
|
✗ |
✗ |
✓ |
✗ |
✗ |
|
|
✗ |
✗ |
✓ |
✗ |
✗ |
|
|
✗ |
✗ |
✓ |
✗ |
✓ |
|
|
✗ |
✗ |
✗ |
✗ |
✓ |
|
|
✓ |
✗ |
✗ |
✗ |
✗ |
|
|
✗ |
✗ |
✓ |
✗ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
|
|
✗ |
✗ |
✗ |
✓ |
✗ |
Document close modes¶
Used with CDocument.close()
|
|
|
kDocCloseModes{ 0: 'kDocCloseProcess',
1: 'kDocCloseSchedule',
2: 'kDocCloseImmediate'}
|
Color models¶
|
|
|
|
|
kColorModels{ 0: 'kColorModelUnknown',
1: 'kColorModelGray',
2: 'kColorModelRGB',
3: 'kColorModelCMYK',
4: 'kColorModelLAB'}
|
Link first selectors¶
|
|
|
|
|
|
|
|
kLinkFirstSelectors{ 0: 'kLinkFirstLeftTop',
1: 'kLinkFirstRightTop',
2: 'kLinkFirstOuterTop',
3: 'kLinkFirstInnerTop',
4: 'kLinkFirstLeftBottom',
5: 'kLinkFirstRightBottom',
6: 'kLinkFirstOuterBottom',
7: 'kLinkFirstInnerBottom'}
|
Link sorting¶
|
|
|
|
kLinkSorting{ 0: 'kLinkSortNo',
1: 'kLinkSortColwise',
2: 'kLinkSortRowwise',
3: 'kLinkSortByZOrder'}
|
Line types¶
|
|
kLineTypes{0: 'kLineTypeRow', 1: 'kLineTypeColumn'}
|
Row types¶
|
|
|
|
kRowTypes{ 0: 'kRowTypeAll',
1: 'kRowTypeHeader',
2: 'kRowTypeBody',
3: 'kRowTypeFooter'}
|
Stroke selectors¶
|
|
|
|
|
|
|
|
kStrokeSelectors{ 0: 'kStrokeSideNone',
1: 'kStrokeSideLeft',
2: 'kStrokeSideTop',
4: 'kStrokeSideRight',
8: 'kStrokeSideBottom',
16: 'kStrokeSideInteriorRows',
32: 'kStrokeSideInteriorColumns',
63: 'kStrokeSideAll'}
|
Stroke attributes¶
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
|
|
|
kExcelCellTypes{ 0: 'kExcelCellTypeError',
1: 'kExcelCellTypeNumber',
3: 'kExcelCellTypeText',
4: 'kExcelCellTypeBoolean',
5: 'kExcelCellTypeDateTime',
6: 'kExcelCellTypeBlank',
7: 'kExcelCellTypeEmpty'}
|
Excel selectors¶
|
|
|
|
|
|
|
kExcelSelectors{ 0: 'kExcelBorderLeft',
1: 'kExcelBorderTop',
2: 'kExcelBorderRight',
3: 'kExcelBorderBottom',
4: 'kExcelBorderDiagonal',
5: 'kExcelPatternForeground',
6: 'kExcelPatternBackground'}
|
Excel border styles¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
|
kExcelUnderlineStyles{ 0: 'kExcelUnderlineNone',
1: 'kExcelUnderlineSingleAbove',
2: 'kExcelUnderlineDoubleAbove',
3: 'kExcelUnderlineSingleBelow',
4: 'kExcelUnderlineDoubleBelow'}
|
Excel font positions¶
|
|
|
kExcelPositions{ 1: 'kExcelPositionNormal',
2: 'kExcelPositionSuper',
3: 'kExcelPositionSub'}
|
Magnet situations¶
|
|
|
|
|
|
|
|
kMagnetSituations{ 0: 'kMagnetsNone',
1: 'kMagnetsPlaceholder',
2: 'kMagnetsScript',
4: 'kMagnetsBuildProducts',
8: 'kMagnetsToDoList',
16: 'kMagnetsChangeTemplate',
32: 'kMagnetsLayoutRule',
4294967295: 'kMagnetsAll'}
|
Magnet states¶
|
|
|
kMagnetStates{1: 'kMagnetsEnable', 0: 'kMagnetsDisable', -1: 'kMagnetsToggle'}
|
Swatch types¶
|
|
|
|
|
|
|
|
|
kSwatchTypes{ 0: 'kSwatchTypeNone',
1: 'kSwatchTypeBaseColor',
2: 'kSwatchTypeTintColor',
3: 'kSwatchTypeMixedInkColor',
4: 'kSwatchTypeLinkedMixedInkColor',
5: 'kSwatchTypeMixedInkParent',
6: 'kSwatchTypeGradient',
7: 'kSwatchTypeBlackBoxPaint',
8: 'kSwatchTypeOther'}
|
Swatch spaces¶
|
|
|
|
|
|
|
|
|
kSwatchSpaces{ 0: 'kSwatchSpaceInvalid',
1: 'kSwatchSpaceFromDisk',
2: 'kSwatchSpaceEmbeddedInImage',
3: 'kSwatchSpaceEmbeddedInDocument',
4: 'kSwatchSpaceGray',
5: 'kSwatchSpaceRGB',
6: 'kSwatchSpaceCMYK',
7: 'kSwatchSpaceLAB',
8: 'kSwatchSpaceVirtual'}
|
Cell types¶
|
|
kCellTypes{1: 'kCellTypeText', 2: 'kCellTypeGraphic'}
|
Overprint settings¶
|
|
|
|
kOverprintSettings{ 0: 'kOverprintBasic',
1: 'kOverprintStroke',
2: 'kOverprintFill',
3: 'kOverprintGap'}
|
Snippet match settings¶
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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¶
|
|
|
|
|
|
|
kHorizontalJustification{ 0: 'kJustifyLeft',
1: 'kJustifyRight',
2: 'kJustifyCenter',
3: 'kJustifyFullLastLineLeft',
4: 'kJustifyFullLastLineRight',
5: 'kJustifyFullLastLineCenter',
6: 'kJustifyFullLastLineFull'}
|
Table column compression¶
|
|
|
|
kTableColumnCompression{ 1: 'kBroadenFirstLast',
0: 'kBroadenFirst',
2: 'kBroadenLast',
3: 'kBroadenNever'}
|