Adds a text string to the transmittal report.
Supported platforms: Windows only
Namespace: TRANSMITTALLib
Assembly: AcETransmit19.tlb
VB.NET:
RetVal = object.addToReport(bstrTextToAdd, nIndex)
C#:
RetVal = object.addToReport(bstrTextToAdd, nIndex);
Type: TransmittalOperation object
The object this method applies to.
Access: Input-only
Type: String
Text string to be added to the transmittal report.
Access: Input-only
Type: Long
Index of the storage area in the transmittal report where the text string should be added.
If you don't have an index number, use a value of -1.
Type: Long
Index of the storage area in the transmittal report where the text string was added.
No additional remarks.
Releases: AutoCAD 2004 and later
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(); }