Returns the document type.
Syntax: |
DlxDocument.GetDocumentType()
|
Return Value
Returns one of the following values:
Value |
Meaning |
DlxApp.DOCTYPE_UNKNOWN |
Unknown document. |
DlxApp.DOCTYPE_DRAWING |
Drawing document. |
DlxApp.DOCTYPE_SCHEMATIC |
Schematic document. |
DlxApp.DOCTYPE_PCB |
PCB document. |
DlxApp.DOCTYPE_LIBRARY |
Components library. |
DlxApp.DOCTYPE_SCRIPT |
Script source text. |
DlxApp.DOCTYPE_CIRCUIT |
SPICE circuit. |
DlxApp.DOCTYPE_MODELS |
SPICE Library. |
DlxApp.DOCTYPE_TEXTRTF |
RTF text document. |
DlxApp.DOCTYPE_TEXT |
Text document. |
DlxApp.DOCTYPE_HTML |
HTML text document. |
Example
|
Copy code
|
var count = 0;
var prj = DlxApp.GetJob().GetProject();
if (prj.IsValid())
{
var items = prj.GetChildCount();
for (var index = 0; index < items; index++)
{
if (prj.GetChildItem(index).GetItemType() == DlxApp.ITEMID_DOCUMENT)
{
if (prj.GetChildItem(index).GetDocumentType() == DlxApp.DOCTYPE_SCHEMATIC)
count++;
}
}
}
DlxApp.Printf("The project includes %i schematics.", count);
|
See also