comet.CArticle¶
- class comet.CArticle¶
CArticle is an article used for document structuring.
In InDesign®, objects of this class represent an entry in the articles panel.
Methods¶
- CArticle.remove()¶
Delete this article. The content of the article is retained.
- Return type:
None
- Raises:
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.getName()¶
Get the name of this article.
- Returns:
The article name.
- Return type:
- Raises:
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.setName(name)¶
Set the name of this article.
- Parameters:
name (str) – The new name. Must not be empty.
- Raises:
TypeError – When parameter types are invalid.
ValueError – When parameter name is empty.
CometError – On internal error.
- Return type:
None
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.getIndex()¶
Get the index of this article in the article list.
- Returns:
The article index.
- Type:
- Raises:
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.setIndex(index)¶
Set the index of this article in the article list.
- Parameters:
index (int) – The new article index. When this parameter value is out of bounds (< 0 or >= count), the article is moved to the end.
- Return type:
None
- Raises:
TypeError – When parameter types are invalid.
ValueError – When parameter name is empty.
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.getUseForExport()¶
Get whether the article added to the accessibility tags.
The function queries the Include article when exporting setting, which is displayed when an article is double-clicked in the articles panel.
- Returns:
Whether the option is enabled.
- Return type:
- Raises:
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.setUseForExport(use=True)¶
Set whether the article should be included in the export. The function sets the Include article when exporting setting, which can be set when double-clicking an article in the article panel.
- Parameters:
use (bool) – Whether the option should be enabled.
- Raises:
TypeError – When parameter types are invalid.
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.getMembers()¶
Create a list of all elements (members) of this article. The list usually contains the document frames whose contents form the article.
- Returns:
A list of the members.
- Return type:
- Raises:
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.addMembers(members)¶
Add new members to this article.
The members are appended to the existing members.
- Parameters:
- Return type:
None
- Raises:
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.getMemberIndex(member)¶
Get the index of a member of the article.
- Returns:
The member index
- Return type:
- Raises:
TypeError – When parameter types are invalid.
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.setMemberIndex(member, index)¶
Set the index of a member of the article.
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid.
CometError – On internal error
- Available:
InDesign® comet_pdf®
- CScript:
- CArticle.removeMembers(members)¶
Remove a member from an article.
The item itself is not deleted.