The basic method generates documentation for the current version of the specified item in either Microsoft Word document (DOCX) format, or Adobe PDF format.



Code Sample


# Set the file format to DOCX/PDF.

$fileformat = "DOCX";


# Set the item identifier.

$itemIdentifier = 1234;


# Generate the documentation.

$documentPackage = $xia.GET_DocumentationBasic($itemIdentifier, $fileformat);


# Save and open the file.

$filename = "$($env:TEMP)\$($documentPackage.Filename)"

[IO.File]::WriteAllBytes($filename, $documentPackage.FileData);

[System.Diagnostics.Process]::Start($filename);