comet.CElement

class comet.CElement

This section describes all functions for the CElement class.

A CElement represents a subtemplate used or to be used in the repeating elements area build mode.

Methods

CElement.getID()

Get the record ID for this element.

Returns:

The record ID

Return type:

CIDType

Available:

InDesign® comet_pdf®

CScript:
CElement.setID(ID)

Set the record ID for this element.

Parameters:

ID (CIDType) – The new record ID

Returns:

None

Available:

InDesign® comet_pdf®

CScript:
CElement.getTemplateID()

Get the template ID for this element.

Returns:

The template ID

Return type:

int

Available:

InDesign® comet_pdf®

CScript:

element::templateid

CElement.setTemplateID(ID)

Set the template ID for this element.

Parameters:

ID (int) – The new template ID

Returns:

None

Available:

InDesign® comet_pdf®

CScript:

element::set_templateid

CElement.getClassID()

Get the class ID for this element.

Returns:

The class ID

Return type:

int

Available:

InDesign® comet_pdf®

CScript:

element::classid

CElement.setClassID(ID)

Set the class ID for this element.

Parameters:

ID (int) – The new class ID

Returns:

None

Available:

InDesign® comet_pdf®

CScript:

element::set_classid

CElement.getFormatString()

Get format string for this element.

Returns:

The format string

Return type:

str

Available:

InDesign® comet_pdf®

CScript:

element::formatstring

CElement.setFormatString(formatString)

Set the format string for this element.

Parameters:

formatString (str) – The new format string

Returns:

None

Available:

InDesign® comet_pdf®

CScript:

element::set_formatstring

CElement.getMasterFrame()

Get the main frame of a repeated element.

Returns:

Main frame of a repeated element.

The call only returns a valid value when this element was created by CFrame.getBuiltElements().

Otherwise the return value is None.

Return type:

CFrame | None

Available:

InDesign® comet_pdf®

CScript:

element::masterframe

CElement.getFrames()

Get the built frames of this element.

Returns:

The built frames.

The call only contains valid values when this element was created by CFrame.getBuiltElements().

Otherwise the return value is an empty list.

Return type:

list[CFrame]

Available:

InDesign® comet_pdf®

CScript:

element::frames

CElement.getOrderNumber()

Get the order number of this element. Order numbers are usually in increments of 10.

Returns:

The order number. The call only contains valid values when this element was created by CFrame.getBuiltElements().

Otherwise the return value is -1.

Return type:

int

Available:

InDesign® comet_pdf®

CScript:

element::ordernumber

Special methods

CElement.__repr__()

String representation.

Returns:

<CElement> ID1: ID1 | ID2: ID2 | ID3: ID3 | StringID: ‘StringID

Template ID: Template ID

Format string: Format string

Example
<CElement> ID1: 1 | ID2: 2 | ID3: 3 | StringID: 'ABCD'
Template ID: 123
Format string: type=area;post=autoload

Return type:

str