Etransmit

This widget could not be displayed.

Etransmit

Anonymous
Not applicable

HI Guys..

 

I am using this sample code to create etransmit. The code work correctly, but I would to know if there is any option to set for create a zip file instead folder.

 

Thanks

Stefano

Function eTransmitaDWG(sDWGtoZip As String, sZipPath As String) As String
        Dim sErr As String = ""

        '/////////////// Call ITransmittalOperation::getTransmittalInfoInterface() to get the ITransmittalInfo interface.
        Dim trmOp As New TransmittalOperation
        trmOp.createTransmittalPackage()

        '/////////////// Use the ITransmittalInfo interface methods to set up the destination folder and other settings.
        Dim trmInfo As TransmittalInfo
        trmInfo = trmOp.getTransmittalInfoInterface
        trmInfo.destinationRoot = sZipPath
        '    'tweak following settings to either include or exclude files in the package
        trmInfo.includeImageFile = True
        trmInfo.includeXrefDwg = True
        trmInfo.includePlotFile = True
        trmInfo.organizedFolder = True
        trmInfo.plotStyleTablePath = True

        'note: limitation - currently saveVersion cannot be set so following will have no effect (it will default to 0=eNoConversion)
        trmInfo.saveVersion = SaveDwgFormat.eNoConversion

        '/////////////// Add files to the transmittal set by calling the appropriate ITransmittalOperation add methods.
        Dim trmFile As New TransmittalFile
        Dim retVal As AddFileReturnVal
        If My.Computer.FileSystem.FileExists(sDWGtoZip) Then

            Try
                retVal = trmOp.addDrawingFile(sDWGtoZip, trmFile)
                If retVal = TRANSMITTALLib.AddFileReturnVal.eFileAdded Then

                Else
                    sErr = retVal.ToString
                End If
            Catch ex As Autodesk.AutoCAD.Runtime.Exception
                sErr = ex.Message & vbNewLine & ex.ToString
            End Try
        Else
            Return "File Not found"
        End If

        '/////////////// Investigate the file dependencies by checking the transmittal graph using the ITransmittalFilesGraph interface methods.
        Dim trmGraph As TransmittalFilesGraph
        trmGraph = trmOp.getTransmittalGraphInterface

        trmOp.createTransmittalPackage() 'copy the files to the folder set by destPath

        'sErr = sTESTSTRING
        Return sErr
    End Function
0 Likes
Reply
Accepted solutions (1)
678 Views
2 Replies
Replies (2)

moogalm
Autodesk Support
Autodesk Support
Accepted solution

The Transmittal Object library does not support the following operations that can be performed with the AutoCAD ETRANSMIT command:

  • Creation of a ZIP file
  • Send an email with the transmittal package as an attachment
Note: The creation of a ZIP file or sending a transmittal pack as an email attachment can be done using a Third-party library or one of the appropriate namespace in the .NET Framework.
 
For documentation Transmittal API - Transmittal API
0 Likes

Anonymous
Not applicable
Thanks
Stefano
0 Likes