Method to check whether a topic from the TopicManager or a file from the FileManager is a linked file. That is, whether the file is dynamically created and modified through a linked Word document or linked FrameMaker document. Linked files include topics, images and style sheets.
The method .isLinked() is located in the file linkedfiles.jsxinc.
Usage
To check topics:
var tpmngr = currentProject.TopicManager;
for(var i = 1; i<=tpmngr.count; i++) {
var topic = tpmngr.item(i);
if(topic.isLinked())
//Do something if this is a linked topic
}To check files from the FileManager:
var filemngr =currentProject.FileManager;
for(var i = 1; i<=filemngr.count; i++) {
var file = filemngr.item(i);
if(file.isLinked())
//Do something if this is a linked file
}To check whether the file is created by a linked FrameMaker document:
if(file.isLinked("framemaker"))
//Do something for a file from a linked FrameMaker document.To check whether the file is created by a linked Word document:
if(file.isLinked("word"))
//Do something for a file from a linked Word document.Parameters
| Parameter | Data type | Required | Description |
|---|---|---|---|
| type | String | The kind of linked document to check. Use word for Word documents and framemaker for FrameMaker documents. When omitted, the method checks whether the file is maintained by a linked document, regardless of the linked document type. |
Return values
| Value | Meaning |
|---|---|
| null | Can not use the method .isLinked() on this object. |
| true | The file is a linked document from the type specified. |
| false | The file is not a linked document or is not a linked document from the specified type. |
