comet.CMagnet

class comet.CMagnet

This section describes all functions for the comet.CMagnet class.

Methods

CMagnet.getType()

Get the type of this magnet.

Returns:

The type of this magnet.

  • 3: Regular magnet

  • 4: Percent magnet

Return type:

int

Raises:

CometError – On internal error

Available:

InDesign® comet_pdf®

CScript:

frame::get_magnet_type

CMagnet.isImage()

Is this a frame or image magnet?

Returns:

Whether this magnet is an image magnet (True) or frame magnet (False).

Return type:

bool

Raises:

CometError – On internal error

Available:

InDesign® comet_pdf®

CScript:

frame::get_magnet_is_white

CMagnet.isRotationOnly()

Is the magnet used for adaptation or in rotation?

Returns:

Whether this magnet is used for rotation (True) or adaption (False).

Return type:

bool

Raises:

CometError – On internal error

Available:

InDesign® comet_pdf®

CScript:

frame::get_magnet_is_rotation_only

CMagnet.getSource()

Get the source frame of this magnet.

Returns:

The source frame of this magnet.

Return type:

CFrame

Raises:

CometError – On internal error

Available:

InDesign® comet_pdf®

CScript:

frame::get_magnet_reference

CMagnet.getTarget()

Get the target frame of this magnet.

Returns:

The target frame of this magnet.

Return type:

CFrame

Raises:

CometError – On internal error

Available:

InDesign® comet_pdf®

CScript:

frame::get_magnet_reference

Special methods

CMagnet.__repr__()

String representation.

Returns:

<CMagnet> Source: Source UID, Source side | Target: Target UID, Target side

Example
<CMagnet> Source: 227, Right | Target: 228, Left

Return type:

str