GetTransmittalReport Method (ActiveX/ATO)

Returns the text string that contains the report that will be included as part of the transmittal package.

Supported platforms: Windows only

Namespace: TRANSMITTALLib

Assembly: AcETransmit19.tlb

Signature

VB.NET:

RetVal = object.getTransmittalReport()

C#:

RetVal = object.getTransmittalReport();
object

Type: TransmittalOperation object

The object this method applies to.

Return Value (RetVal)

Type: String

The text string that represents the textual content of the transmittal report.

Remarks

No additional remarks.

Release Information

Releases: AutoCAD 2005 and later

Examples

VB.NET:

' Custom command that creates a transmittal package and adds a transmittal report
<CommandMethod("eTransmitCustomReport")> _
Public Shared Sub eTransmitCustomReport()

    ' Create a transmittal operation
    Dim tro As TransmittalOperation = New TransmittalOperation()

    ' Setup the transmittal behavior
    Dim ti As TransmittalInfo = _
        TransInfo(tro.getTransmittalInfoInterface(), "C:\Users\Public\TransmittalAPITest\")

    ' Add a file notification handler
    Dim fileHandler As New MyTransFileNotifier
    tro.subscribeToAddFileNotification(fileHandler)

    ' Setup the progress meter to monitor the files being added to the
    ' transmittal set from the sheet set
    Dim pmHandler As New MyProgressHandler
    tro.setProgressMeter(pmHandler, 1)

    ' Add a sheet set
    TransAddFile(tro, "C:\AutoCAD\Sample\Sheet Sets\Architectural\IRD Addition.dst", FileType.SheetSet)

    ' Append text to the transmittal report
    Dim nFirstSection As Integer = -1
    nFirstSection = tro.addToReport("Custom First Section:", nFirstSection)
    tro.addToReport(Environment.NewLine & "First line of first custom section.", nFirstSection)

    ' Append text to the transmittal report
    Dim nSecondSection As Integer = -1
    nSecondSection = tro.addToReport(Environment.NewLine & "Custom Second Section:", nSecondSection)
    tro.addToReport(Environment.NewLine & "First line of second custom section.", nSecondSection)

    ' Append text to the first section
    tro.addToReport(Environment.NewLine & "Second line of first custom section.", nFirstSection)

    ' Get the transmittal report
    Dim tr As String = tro.getTransmittalReport()

    ' Write the transmittal report to the file "transmittal report.txt" in the
    ' destination root of the transmittal package
    writeReport(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + _
                "\transmittal report.txt", tro.getTransmittalReport())

    ' Add the report to the transmittal package
    Dim tf As TransmittalFile = TransAddFile(tro, _
                Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + _
                "\transmittal report.txt", FileType.Unknown, Nothing)

    ' Change the path of the transmittal report
    tf.targetSubPath = ""

    ' Remove the file notification handler
    tro.cancelSubscriptionToAddFileNotification(fileHandler)

    ' Create the transmittal package
    ' Files are copied and resaved to the path specified by the destinationRoot property
    ' and the other settings of the TransmittalInfo object.
    tro.createTransmittalPackage()
End Sub

C#:

// Custom command that creates a transmittal package and adds a transmittal report
[CommandMethod("eTransmitCustomReport")]
public static void eTransmitCustomReport()
{
    // Create a transmittal operation
    TransmittalOperation tro = new TransmittalOperation();

    // Setup the transmittal behavior
    TransmittalInfo ti = TransInfo(tro.getTransmittalInfoInterface(),
                                   "C:\\Users\\Public\\TransmittalAPITest\\");

    // Add a file notification handler
    MyTransFileNotifier fileHandler = new MyTransFileNotifier();
    tro.subscribeToAddFileNotification(fileHandler);

    // Setup the progress meter to monitor the files being added to the
    // transmittal set from the sheet set
    MyProgressHandler pmHandler = new MyProgressHandler();
    tro.setProgressMeter(pmHandler, 1);

    // Add a sheet set
    TransAddFile(tro, "C:\\AutoCAD\\Sample\\Sheet Sets\\Architectural\\IRD Addition.dst",
                 FileType.SheetSet);

    // Append text to the transmittal report
    int nFirstSection = -1;
    nFirstSection = tro.addToReport("Custom First Section:", nFirstSection);
    tro.addToReport(Environment.NewLine + "First line of first custom section.", nFirstSection);

    // Append text to the transmittal report
    int nSecondSection = -1;
    nSecondSection = tro.addToReport(Environment.NewLine + "Custom Second Section:", nSecondSection);
    tro.addToReport(Environment.NewLine + "First line of second custom section.", nSecondSection);

    // Append text to the first section
    tro.addToReport(Environment.NewLine + "Second line of first custom section.", nFirstSection);

    // Get the transmittal report
    string tr = tro.getTransmittalReport();

    // Write the transmittal report to the file "transmittal report.txt" in the
    // destination root of the transmittal package
    writeReport(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) +
                "\\transmittal report.txt", tro.getTransmittalReport());

    // Add the report to the transmittal package
    TransmittalFile tf = TransAddFile(tro,
                Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) +
                "\\transmittal report.txt", FileType.Unknown, null);

    // Change the path of the transmittal report
    tf.targetSubPath = "";

    // Remove the file notification handler
    tro.cancelSubscriptionToAddFileNotification(fileHandler);

    // Create the transmittal package
    // Files are copied and resaved to the path specified by the destinationRoot property
    // and the other settings of the TransmittalInfo object.
    tro.createTransmittalPackage();
}