comet.panel

The comet.panel module provides functions for enabling/disabling and showing/hiding comet panels.

Also, it is possible to query list entries from certain panels and query or modify the selection of said lists.

Methods

comet.panel.isEnabled(panelID)

Get whether a comet panel is locked for user interaction.

Parameters:

panelID (int) –

The panel to query.

One of Panel IDs except for constants.kPanelUndef.

Returns:

Whether the panel in question is locked.

Return type:

bool

Raises:
  • TypeError – When parameter types are invalid.

  • ValueError – When parameter panelID has invalid value.

Available:

InDesign® Illustrator®

See also:

setEnabled()

CScript:

prefs::enable_panel

comet.panel.setEnabled(panelID, enabled, message='')

Enable or disable panel interaction.

Calls to the function should preferably be made in the after-login script (panelstatement 92).

After disconnecting the current data connection, all active locks are released.

Disabling a panel serves only to protect against unintentional changes of configuration data.

Parameters:
  • panelID (int) – The panel to lock. One of Panel IDs except for constants.kPanelUndef.

  • enabled (bool) –

    Enable or disable the panel?

    • True: Enable the panel.

    • False: Disable the panel.

  • message (str) –

    When enabled is False, this message is displayed on the panel.

    The text is shown behind ‘Panel blocked by’ and must not be empty and not longer than 255 characters.

    Unicode letters are encoded like e.g. ‘<0x00FC>’.

    If this value starts with the ‘@’ character, the prefix ‘Panel blocked by’ is omitted.

Returns:

None

Raises:
  • TypeError – When parameter types are invalid.

  • ValueError

    • When parameter panelID has invalid value.

    • When parameter enabled is False and message is empty or too long.

  • CometError – On internal error.

Available:

InDesign® Illustrator®

See also:

isEnabled()

CScript:

prefs::enable_panel

comet.panel.isVisible(panelID)

Get whether a comet panel is currently visible.

Parameters:

panelID (int) –

The panel to query.

One of Panel IDs except for constants.kPanelUndef.

Returns:

Whether the panel in question is visible.

Return type:

bool

Raises:
  • TypeError – When parameter types are invalid.

  • ValueError – When parameter panelID has invalid value.

Available:

InDesign® Illustrator®

See also:

setVisible()

CScript:

prefs::show_panel

comet.panel.setVisible(panelID, visible)

Show or hide a comet panel.

Parameters:

panelID (int) –

The panel to show or hide.

One of Panel IDs except for constants.kPanelUndef.

Return type:

None

Raises:
  • TypeError – When parameter types are invalid.

  • ValueError – When parameter panelID has invalid value.

Available:

InDesign® Illustrator®

See also:

isVisible()

CScript:

prefs::show_panel

comet.panel.reloadList(panelID)

For panels that have a list (e.g. product pool, templates, etc…), this function can be used to reload the entries of that list.

Parameters:

panelID (int) –

The panel to reload the list for.

One of Panel IDs except for constants.kPanelUndef.

When the panel has no primary list, the function does nothing.

Returns:

None

Raises:
Available:

InDesign® Illustrator®

CScript:

list::reload