CloseDocument

Closes the specified document.

Syntax

CloseDocument(doc)

Parameters

Parameter

Type

Description

doc

documentReference

Reference to the document

Return

None.

Examples

Python

import nex
# this script prints the number of variables in the file
doc = nex.GetActiveDocument()
print("document contains {} variables".format(nex.GetVarCount(doc,"all")))
nex.CloseDocument(doc)

NexScript

% this script prints the number of variables in the file
doc = GetActiveDocument()
Trace("document contains", GetVarCount(doc, "all"), "variables")
CloseDocument(doc)