Community
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
Solved! Go to Solution.
Solved by moogalm. Go to Solution.
The Transmittal Object library does not support the following operations that can be performed with the AutoCAD ETRANSMIT command:
Can't find what you're looking for? Ask the community or share your knowledge.