.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Etransmit

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
662 Views, 2 Replies

Etransmit

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
2 REPLIES 2
Message 2 of 3
moogalm
in reply to: Anonymous

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
Message 3 of 3
Anonymous
in reply to: moogalm

Thanks
Stefano

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report