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

  • Connect to the configuration web service

  • Specify the identifier of the item.

  • Specify the file format as either "DOCX" or "PDF".

  • Configure the options as required.

  • Specify the identifier of the item.

  • Specify the version of the item.



Code Sample


# Set the file format to DOCX/PDF.

$fileformat = "DOCX";


# Set the item identifier.

$itemIdentifier = 1234;


# Set the version identifier or zero for the current version.

$versionIdentifier = 0;


# Get the current documentation options.

$options = $xia.GET_CurrentDocumentationOptions();


# Generate a password.

$password = $xia.GET_EncryptedPassword("Password");


# Set the documentation options as required.

$options.General.Author = "Sample Author";

$options.General.Relationships = $false;

$options.DocumentSecurity.Password.EncryptedPassword = $password;


# Generate the documentation.

$documentPackage = $xia.GET_Documentation($itemIdentifier, $versionIdentifier, $options, $fileformat);


# Save and open the file.

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

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

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