ResultXmlFileWriter Class

class NXOpen.Report.ResultXmlFileWriter

Bases: NXOpen.TransientObject

Contains methods for adding document data and generating result XML file for CAE Report.

New in version NX11.0.0.

Methods

Method Description
AddImageGroup Creates a new NXOpen.OpenXml.ImageGroupDocumentData object.
AddTable Creates a new NXOpen.OpenXml.TableDocumentData object.
AddText Creates a new NXOpen.OpenXml.TextDocumentData object.
DeleteAllData Removes all document data
DeleteNthData Removes the nth document data
Dispose Frees the object from memory.
GetDataCount Gets the number of data to be exported
GetNthData Gets the nth document data object.
SaveToFile Exports all document data to result XML file

Method Detail

AddImageGroup

ResultXmlFileWriter.AddImageGroup

Creates a new NXOpen.OpenXml.ImageGroupDocumentData object.

Does not to free this object, it will be free while deleting NXOpen.Report.ResultXmlFileWriter object

Signature AddImageGroup()

Returns:the image group data
Return type:NXOpen.OpenXml.ImageGroupDocumentData

New in version NX11.0.0.

License requirements: None.

AddTable

ResultXmlFileWriter.AddTable

Creates a new NXOpen.OpenXml.TableDocumentData object.

Does not to free this object, it will be free while deleting NXOpen.Report.ResultXmlFileWriter object

Signature AddTable(columnSize, rowSize)

Parameters:
  • columnSize (int) – the column size of the table
  • rowSize (int) – the row size of the table
Returns:

the table data

Return type:

NXOpen.OpenXml.TableDocumentData

New in version NX11.0.0.

License requirements: None.

AddText

ResultXmlFileWriter.AddText

Creates a new NXOpen.OpenXml.TextDocumentData object.

Does not to free this object, it will be free while deleting NXOpen.Report.ResultXmlFileWriter object

Signature AddText(textContent)

Parameters:textContent (str) – the content of the text data
Returns:the text data
Return type:NXOpen.OpenXml.TextDocumentData

New in version NX11.0.0.

License requirements: None.

DeleteAllData

ResultXmlFileWriter.DeleteAllData

Removes all document data

Signature DeleteAllData()

New in version NX11.0.0.

License requirements: None.

DeleteNthData

ResultXmlFileWriter.DeleteNthData

Removes the nth document data

Signature DeleteNthData(index)

Parameters:index (int) – the index of data

New in version NX11.0.0.

License requirements: None.

Dispose

ResultXmlFileWriter.Dispose

Frees the object from memory.

After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector.

Signature Dispose()

New in version NX11.0.0.

License requirements: None.

GetDataCount

ResultXmlFileWriter.GetDataCount

Gets the number of data to be exported

Signature GetDataCount()

Returns:the number of data
Return type:int

New in version NX11.0.0.

License requirements: None.

GetNthData

ResultXmlFileWriter.GetNthData

Gets the nth document data object.

Does not to free this object, it will be free while deleting NXOpen.Report.ResultXmlFileWriter object

Signature GetNthData(index)

Parameters:index (int) – the index of data
Returns:the data
Return type:NXOpen.OpenXml.DocumentData

New in version NX11.0.0.

License requirements: None.

SaveToFile

ResultXmlFileWriter.SaveToFile

Exports all document data to result XML file

Signature SaveToFile(fileName)

Parameters:fileName (str) – the file name to be exported

New in version NX11.0.0.

License requirements: None.